Skip to content

Commit

Permalink
Allow running of bumptag with out signed commits or tags
Browse files Browse the repository at this point in the history
By setting ALLOW_UNSIGNED_COMMITS_WITHOUT_TAGS you can bootstrap bumptag
on first startup of new repo
  • Loading branch information
mickenordin committed Dec 4, 2023
1 parent ecedda6 commit cacb97a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions bump-tag
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,15 @@ tag_list="$(git tag -l "${tagpfx}-*")"
# shellcheck disable=SC2181
if [[ ${?} -ne 0 ]] || [[ -z "${tag_list}" ]]; then

echo "No tags found, verifying all commits instead."
# %H = commit hash
# %G? = show "G" for a good (valid) signature
git_log="$(git log --pretty="format:%H${t}%G?" \
--first-parent \
| grep -v "${t}G$")"
if [[ -z ${ALLOW_UNSIGNED_COMMITS_WITHOUT_TAGS} ]]; then
echo "No tags found, verifying all commits instead."
echo "Please set environment variable ALLOW_UNSIGNED_COMMITS_WITHOUT_TAGS if you want to disable this check."
# %H = commit hash
# %G? = show "G" for a good (valid) signature
git_log="$(git log --pretty="format:%H${t}%G?" \
--first-parent \
| grep -v "${t}G$")"
fi

else

Expand Down

0 comments on commit cacb97a

Please sign in to comment.