From 060d91c40c8d7a7c96c4382579c0a903cec37851 Mon Sep 17 00:00:00 2001 From: Jon Friesen Date: Tue, 20 Aug 2024 13:40:47 -0600 Subject: [PATCH] don't include v in version when comparing --- scripts/prerelease_check.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/prerelease_check.sh b/scripts/prerelease_check.sh index 2e61f7a..43879ff 100755 --- a/scripts/prerelease_check.sh +++ b/scripts/prerelease_check.sh @@ -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") @@ -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"