Skip to content

Commit

Permalink
chore: fix display problems in version-check workflow (#4675)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevwan authored Mar 1, 2025
1 parent 68d1aba commit c0394b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
id: get_version
run: |
# Extract version from tools/goctl/v* format
echo "VERSION=${GITHUB_REF#refs/tags/tools/goctl/v}" >> $GITHUB_ENV
VERSION="${GITHUB_REF#refs/tags/tools/goctl/v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Extracted version: $VERSION"
- name: Check version in goctl source code
Expand All @@ -31,7 +32,11 @@ jobs:
# Check version in BuildVersion constant
VERSION_IN_CODE=$(grep -r "const BuildVersion =" . | grep -o '".*"' | tr -d '"')
echo "Version in code: $VERSION_IN_CODE"
echo "Expected version: $VERSION"
if [ "$VERSION_IN_CODE" != "$VERSION" ]; then
echo "Version mismatch: Version in code ($VERSION_IN_CODE) doesn't match tag version ($VERSION)"
exit 1
fi
echo "✅ Version check passed!"

0 comments on commit c0394b6

Please sign in to comment.