Skip to content

Commit

Permalink
don't include v in version when comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfriesen committed Aug 20, 2024
1 parent e419350 commit 060d91c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/prerelease_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ get_json_version() {
# Get the current git tag
git_tag=$(git describe --tags --abbrev=0)

# Remove 'v' prefix from git tag for comparison
git_tag_version=${git_tag#v}

# Get the version from package.json
package_version=$(get_json_version "./package.json")

Expand All @@ -30,7 +33,7 @@ tag_commit=$(git rev-list -n 1 $git_tag)
current_commit=$(git rev-parse HEAD)

# Check if all versions match
if [ "$git_tag" = "$package_version" ] && [ "$git_tag" = "$manifest_version" ] && [ "$git_tag" = "$dist_manifest_version" ]; then
if [ "$git_tag_version" = "$package_version" ] && [ "$git_tag_version" = "$manifest_version" ] && [ "$git_tag_version" = "$dist_manifest_version" ]; then
echo "Version check passed: All versions match ($git_tag)"
else
echo "Version check failed: Versions do not match"
Expand Down

0 comments on commit 060d91c

Please sign in to comment.