From 82c8c9dcad3465ef46c4d0518c447a42388244f4 Mon Sep 17 00:00:00 2001 From: Telan <13066272+TheElan@users.noreply.github.com> Date: Fri, 12 Nov 2021 20:12:37 +0200 Subject: [PATCH] fix update-version.sh not pushing HEAD to branch --- .github/scripts/update-version.sh | 3 ++- build.gradle | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/update-version.sh b/.github/scripts/update-version.sh index ec9e040..7005ea5 100755 --- a/.github/scripts/update-version.sh +++ b/.github/scripts/update-version.sh @@ -1,9 +1,10 @@ +git checkout ${GITHUB_REF##*/} if [ ! -z $(git diff --name-only HEAD HEAD~1 | grep build.gradle) ]; then new_version="$(git log -n1 --format=format:"%H")" sed --in-place "s!//version:.*!//version: $new_version!g" build.gradle git add build.gradle git commit -m "[ci skip] update build script version to $new_version" - git push origin HEAD:${GITHUB_REF##*/} + git push echo "Updated buildscript version to $new_version"; else echo "Ignored buildscript version update: no changes detected" diff --git a/build.gradle b/build.gradle index 715ee07..ab772ae 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: commit hash placeholder +//version: commit hash placeholder; dummysome changes to test automatic version update /* DO NOT CHANGE THIS FILE!