-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge pull request #313 from anothrNick/revert-310-master"
- Loading branch information
Showing
2 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ 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 | ||
|
@@ -47,7 +48,8 @@ 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: ${force_without_changes}" | ||
echo -e "\tFORCE_WITHOUT_CHANGES: ${force_without_changes}" | ||
echo -e "\tFORCE_WITHOUT_CHANGES_PRE: ${force_without_changes_pre}" | ||
|
||
# verbose, show everything | ||
if $verbose | ||
|
@@ -127,7 +129,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" | ||
|
@@ -190,7 +192,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" ] | ||
if [ "$pre_tag_commit" == "$commit" ] && [ "$pre_force_without_changes" == "false" ] | ||
Check warning on line 195 in entrypoint.sh GitHub Actions / Lint Bash scripts
|
||
then | ||
echo "No new commits since previous pre_tag. Skipping..." | ||
setOutput "new_tag" "$pre_tag" | ||
|
@@ -281,4 +283,4 @@ EOF | |
else | ||
# use git cli to push | ||
git push -f origin "$new" || exit 1 | ||
fi | ||
fi |