Skip to content

Commit

Permalink
fix: Revert "chore: Replace deprecated command with environment file (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
eschutho authored Feb 29, 2024
1 parent 9900f56 commit d6e8dd1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/tag_latest_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,21 @@ done

if [ -z "${GITHUB_TAG_NAME}" ]; then
echo "Missing tag parameter, usage: ./scripts/tag_latest_release.sh <GITHUB_TAG_NAME>"
echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
echo "::set-output name=SKIP_TAG::true"
exit 1
fi

if [ -z "$(git_show_ref)" ]; then
echo "The tag ${GITHUB_TAG_NAME} does not exist. Please use a different tag."
echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
echo "::set-output name=SKIP_TAG::true"
exit 0
fi

# check that this tag only contains a proper semantic version
if ! [[ ${GITHUB_TAG_NAME} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
then
echo "This tag ${GITHUB_TAG_NAME} is not a valid release version. Not tagging."
echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
echo "::set-output name=SKIP_TAG::true"
exit 1
fi

Expand Down Expand Up @@ -177,14 +177,14 @@ done
# Determine the result based on the comparison
if [[ -z "$compare_result" ]]; then
echo "Versions are equal"
echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
echo "::set-output name=SKIP_TAG::true"
elif [[ "$compare_result" == "greater" ]]; then
echo "This release tag ${GITHUB_TAG_NAME} is newer than the latest."
echo "SKIP_TAG=false" >>$GITHUB_OUTPUT
echo "::set-output name=SKIP_TAG::false"
# Add other actions you want to perform for a newer version
elif [[ "$compare_result" == "lesser" ]]; then
echo "This release tag ${GITHUB_TAG_NAME} is older than the latest."
echo "This release tag ${GITHUB_TAG_NAME} is not the latest. Not tagging."
# if you've gotten this far, then we don't want to run any tags in the next step
echo "SKIP_TAG=true" >>$GITHUB_OUTPUT
echo "::set-output name=SKIP_TAG::true"
fi

0 comments on commit d6e8dd1

Please sign in to comment.