From 2d6a2170835d1704f62d6e2d3c2c0f935075fed4 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Thu, 27 Jul 2023 13:18:58 +0400 Subject: [PATCH] Bugfix: version file was being created for Piped-Alpine repo --- .gitignore | 1 + build.sh | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9a2be9a..b27f7dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ piped.jar config.properties +VERSION backend/ reqwest4j/ diff --git a/build.sh b/build.sh index 0f4ad20..abe6007 100755 --- a/build.sh +++ b/build.sh @@ -30,6 +30,12 @@ try_exec () { return 0 } +set_piped_version () { + commit_date=$(git log -1 --date=short --pretty=format:%cd) + commit_sha=$(git rev-parse --short HEAD) + echo "$commit_date-$commit_sha" >VERSION +} + title () { # Newline, Bold text, $1, Normal text, Newline printf '\n\033[1m%s\033[0m\n' "$1" @@ -121,7 +127,7 @@ cd_and_exec backend/libs mv "$REQ4J" ./ # From GitHub Actions title 'Creating VERSION file...' -cd_and_exec backend echo "$(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD)" >VERSION +cd_and_exec backend set_piped_version title 'Building Piped...' cd_and_exec backend ./gradlew shadowJar