@@ -22,6 +22,7 @@ patch_string_token=${PATCH_STRING_TOKEN:-#patch}
2222none_string_token=${NONE_STRING_TOKEN:-# none}
2323branch_history=${BRANCH_HISTORY:- compare}
2424force_without_changes=${FORCE_WITHOUT_CHANGES:- false}
25+ force_without_changes_pre=${FORCE_WITHOUT_CHANGES:- false}
2526
2627# since https://github.blog/2022-04-12-git-security-vulnerability-announced/ runner uses?
2728git config --global --add safe.directory /github/workspace
@@ -47,7 +48,8 @@ echo -e "\tMINOR_STRING_TOKEN: ${minor_string_token}"
4748echo -e " \tPATCH_STRING_TOKEN: ${patch_string_token} "
4849echo -e " \tNONE_STRING_TOKEN: ${none_string_token} "
4950echo -e " \tBRANCH_HISTORY: ${branch_history} "
50- echo -e " \tFORCE: ${force_without_changes} "
51+ echo -e " \tFORCE_WITHOUT_CHANGES: ${force_without_changes} "
52+ echo -e " \tFORCE_WITHOUT_CHANGES_PRE: ${force_without_changes_pre} "
5153
5254# verbose, show everything
5355if $verbose
@@ -127,7 +129,7 @@ tag_commit=$(git rev-list -n 1 "$tag" || true )
127129# get current commit hash
128130commit=$( git rev-parse HEAD)
129131# skip if there are no new commits for non-pre_release
130- if [ " $tag_commit " == " $commit " ] && [ " $force_without_changes " == " false" ]
132+ if [ " $tag_commit " == " $commit " ] && [ " $force_without_changes " == " false" ]
131133then
132134 echo " No new commits since previous tag. Skipping..."
133135 setOutput " new_tag" " $tag "
190192 # get current commit hash for tag
191193 pre_tag_commit=$( git rev-list -n 1 " $pre_tag " || true)
192194 # skip if there are no new commits for pre_release
193- if [ " $pre_tag_commit " == " $commit " ]
195+ if [ " $pre_tag_commit " == " $commit " ] && [ " $force_without_changes_pre " == " false " ]
194196 then
195197 echo " No new commits since previous pre_tag. Skipping..."
196198 setOutput " new_tag" " $pre_tag "
281283else
282284 # use git cli to push
283285 git push -f origin " $new " || exit 1
284- fi
286+ fi
0 commit comments