From 39ed134f96a25dfbba6ec2eb2818fa82d499dbd0 Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Thu, 21 Jan 2021 23:04:47 +0330 Subject: [PATCH] improve builds --- .github/scripts/commit-repo.sh | 17 +++++++++-------- .github/scripts/create-repo.sh | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/scripts/commit-repo.sh b/.github/scripts/commit-repo.sh index 60a9f86b..d81bcd7e 100755 --- a/.github/scripts/commit-repo.sh +++ b/.github/scripts/commit-repo.sh @@ -4,14 +4,15 @@ cp ../master/repo/server-r* . new_build=$(ls | tail -1) echo "New build file name: $new_build" -diff $new_build server-latest.jar > /dev/null -if [ $? -eq 1 ]; then - echo "This is different to latest, replace latest." - cp -f $new_build server-latest.jar -else - echo "This is the same as latest, throw it away." - rm $new_build -fi +# every build generates different jar even if same code, so comment this out. +#diff $new_build server-latest.jar > /dev/null +#if [ $? -eq 1 ]; then +# echo "This is different to latest, replace latest." +# cp -f $new_build server-latest.jar +#else +# echo "This is the same as latest, throw it away." +# rm $new_build +#fi git config --global user.email "github-actions[bot]@users.noreply.github.com" diff --git a/.github/scripts/create-repo.sh b/.github/scripts/create-repo.sh index fc78e9b0..0d7ef387 100755 --- a/.github/scripts/create-repo.sh +++ b/.github/scripts/create-repo.sh @@ -4,5 +4,7 @@ set -e mkdir -p repo/ 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" \ No newline at end of file