Skip to content

Commit

Permalink
Update create_rel_tag.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaustubh-pande authored Mar 27, 2024
1 parent 3169d0c commit e63da40
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/create_rel_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ jobs:
- name: Compare tags
id: compare_tags
run: |
run: |
latest_tag=${{ steps.get_tag.outputs.old_tag_name }}
new_tag=v0.0.2
new_tag=${{ github.event.inputs.tag_name }}
echo "Latest Tag: $latest_tag"
echo "New Tag: $new_tag"
node -e "const latestMajor = parseInt(process.env.LATEST_TAG.substring(1).split('.')[0]); const latestMinor = parseInt(process.env.LATEST_TAG.substring(1).split('.')[1]); const latestPatch = parseInt(process.env.LATEST_TAG.substring(1).split('.')[2]); const newMajor = parseInt(process.env.NEW_TAG.substring(1).split('.')[0]); const newMinor = parseInt(process.env.NEW_TAG.substring(1).split('.')[1]); const newPatch = parseInt(process.env.NEW_TAG.substring(1).split('.')[2]); if (latestMajor > newMajor || (latestMajor === newMajor && latestMinor > newMinor) || (latestMajor === newMajor && latestMinor === newMinor && latestPatch >= newPatch)) { console.log('Error: New tag is not greater than the latest tag.'); process.exit(1); }"
Expand Down

0 comments on commit e63da40

Please sign in to comment.