From 6ec7679549a132115a38ac01743b6e0ffecc0535 Mon Sep 17 00:00:00 2001 From: Nick Sjostrom Date: Fri, 12 Apr 2024 12:27:13 -0400 Subject: [PATCH] Revert "Fixes #309" --- README.md | 1 - entrypoint.sh | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4bc48536..05e9ab50 100755 --- a/README.md +++ b/README.md @@ -105,7 +105,6 @@ _NOTE: set the fetch-depth for `actions/checkout@v2` or newer to be sure you ret - `last`: show the single last commit - `compare`: show all commits since previous repo tag number - **FORCE_WITHOUT_CHANGES** _(optional)_ - Enforce the brach creation even if there are no changes from the tag. -- **FORCE_WITHOUT_CHANGES_PRE** _(optional)_ - Similar to force without changes, for pre-releases. ### Outputs diff --git a/entrypoint.sh b/entrypoint.sh index 63741c54..e1b0d35d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -22,7 +22,6 @@ patch_string_token=${PATCH_STRING_TOKEN:-#patch} none_string_token=${NONE_STRING_TOKEN:-#none} branch_history=${BRANCH_HISTORY:-compare} force_without_changes=${FORCE_WITHOUT_CHANGES:-false} -force_without_changes_pre=${FORCE_WITHOUT_CHANGES:-false} # since https://github.blog/2022-04-12-git-security-vulnerability-announced/ runner uses? git config --global --add safe.directory /github/workspace @@ -48,8 +47,7 @@ echo -e "\tMINOR_STRING_TOKEN: ${minor_string_token}" echo -e "\tPATCH_STRING_TOKEN: ${patch_string_token}" echo -e "\tNONE_STRING_TOKEN: ${none_string_token}" echo -e "\tBRANCH_HISTORY: ${branch_history}" -echo -e "\tFORCE_WITHOUT_CHANGES: ${force_without_changes}" -echo -e "\tFORCE_WITHOUT_CHANGES_PRE: ${force_without_changes_pre}" +echo -e "\tFORCE: ${force_without_changes}" # verbose, show everything if $verbose @@ -129,7 +127,7 @@ tag_commit=$(git rev-list -n 1 "$tag" || true ) # get current commit hash commit=$(git rev-parse HEAD) # skip if there are no new commits for non-pre_release -if [ "$tag_commit" == "$commit" ] && [ "$force_without_changes" == "false" ] +if [ "$tag_commit" == "$commit" ] && [ "$force_without_changes" == "false" ] then echo "No new commits since previous tag. Skipping..." setOutput "new_tag" "$tag" @@ -192,7 +190,7 @@ then # get current commit hash for tag pre_tag_commit=$(git rev-list -n 1 "$pre_tag" || true) # skip if there are no new commits for pre_release - if [ "$pre_tag_commit" == "$commit" ] && [ "$pre_force_without_changes" == "false" ] + if [ "$pre_tag_commit" == "$commit" ] then echo "No new commits since previous pre_tag. Skipping..." setOutput "new_tag" "$pre_tag" @@ -283,4 +281,4 @@ EOF else # use git cli to push git push -f origin "$new" || exit 1 -fi +fi \ No newline at end of file