improve builds

This commit is contained in:
Aria Moradi 2021-01-21 23:04:47 +03:30
parent 7e4b495398
commit 39ed134f96
2 changed files with 11 additions and 8 deletions

View File

@ -4,14 +4,15 @@ cp ../master/repo/server-r* .
new_build=$(ls | tail -1) new_build=$(ls | tail -1)
echo "New build file name: $new_build" echo "New build file name: $new_build"
diff $new_build server-latest.jar > /dev/null # every build generates different jar even if same code, so comment this out.
if [ $? -eq 1 ]; then #diff $new_build server-latest.jar > /dev/null
echo "This is different to latest, replace latest." #if [ $? -eq 1 ]; then
cp -f $new_build server-latest.jar # echo "This is different to latest, replace latest."
else # cp -f $new_build server-latest.jar
echo "This is the same as latest, throw it away." #else
rm $new_build # echo "This is the same as latest, throw it away."
fi # rm $new_build
#fi
git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.email "github-actions[bot]@users.noreply.github.com"

View File

@ -4,5 +4,7 @@ set -e
mkdir -p repo/ mkdir -p repo/
revision=$(git rev-list master --count) revision=$(git rev-list master --count)
# add zero padding
revision=$(printf %04d $revision)
cp server/build/server-1.0-all.jar "repo/server-r$revision.jar" cp server/build/server-1.0-all.jar "repo/server-r$revision.jar"