new scripts

This commit is contained in:
Aria Moradi 2021-01-21 16:01:55 +03:30
parent 33c4cdbc48
commit 687dad5fc0
3 changed files with 13 additions and 4 deletions

View File

@ -1,7 +1,16 @@
#!/bin/bash
set -e
rsync -a --delete --exclude .git --exclude .gitignore ../master/repo/ .
cp ../master/repo/server-r* .
new_build=$(ls | tail -1)
diff $new_build server-latest.jar > /dev/null
if [ "$?" -ne 0 ]; then # same file?
rm $new_build
else
cp -f $new_build server-latest.jar
fi
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git status

View File

@ -3,7 +3,6 @@ set -e
mkdir -p repo/
revision=$(git rev-list HEAD --count)
revision=$(git rev-list master --count)
cp server/build/server-1.0-all.jar "repo/server-r$revision.jar"
cp -f server/build/server-1.0-all.jar "repo/server-latest.jar"

View File

@ -35,6 +35,7 @@ jobs:
with:
ref: master
path: master
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v1