Skip to content

Commit

Permalink
create tag with v prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
o-orand committed Jan 17, 2024
1 parent 6692a0c commit ef40bf3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -e
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
version=${GITHUB_REF#refs/tags/}
version=${version#v}
tag_version=v${version}
release=true
elif [[ "$GITHUB_REF" == refs/heads/* ]]; then
version=${GITHUB_REF#refs/heads/}
Expand Down Expand Up @@ -33,6 +34,8 @@ fi
if [ -n "$INPUT_TAG_NAME" ];then
echo "Tag_name detected. Overriding version name and enabling final release"
version=$INPUT_TAG_NAME
version=${version#v}
tag_version=v${version}
release=true
fi

Expand Down Expand Up @@ -120,7 +123,7 @@ if [ "${release}" == "true" ]; then
else
echo "pushing changes to git repository"
# Override any existing tag with same version. This may happen if only part of the renovate PRs were merged
git tag -a -m "cutting release ${version}" ${version} $PUSH_OPTIONS
git tag -a -m "cutting release ${tag_version}" ${tag_version} $PUSH_OPTIONS
# In case a renovate PR was merged in between, try to rebase prior to pushing
git pull --rebase ${remote_repo}
if [[ "${INPUT_OVERRIDE_EXISTING}" == "true" ]]; then
Expand Down

0 comments on commit ef40bf3

Please sign in to comment.