Conversation
2f2656c to
b71a7e2
Compare
b71a7e2 to
92d1223
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates the release workflow to check that embedded version numbers in README.md and package.json match the Git tag instead of altering them automatically.
- Renamed the update step to “Check embedded version numbers”
- Revised logic to verify version consistency in README.md and package.json
- Removed the automatic committing and tagging steps
| git push origin 'HEAD:${{ github.event.repository.default_branch }}' | ||
| git tag --force "${GITHUB_REF_NAME}" HEAD | ||
| git push origin "${GITHUB_REF_NAME}" --force | ||
| version="$(grep -F "uses: ${GITHUB.REPOSITORY}@" README.md | cut -d@ -f2)" |
There was a problem hiding this comment.
Consider ensuring that the grep command returns only a single version value. If multiple matches are possible, you might use a command like 'head -1' to avoid ambiguity.
Suggested change
| version="$(grep -F "uses: ${GITHUB.REPOSITORY}@" README.md | cut -d@ -f2)" | |
| version="$(grep -F "uses: ${GITHUB.REPOSITORY}@" README.md | head -1 | cut -d@ -f2)" |
| if [[ ${version} != "${GITHUB_REF_NAME}" ]]; then | ||
| line="$(grep -Fn "uses: ${GITHUB.REPOSITORY}@" README.md | cut -d: -f1)" | ||
| printf '::error file=README.md,line=%d::version does not match tag\n' "${line}" | ||
| rc=1 |
There was a problem hiding this comment.
For clarity and to ensure a consistent exit code variable, consider initializing 'rc' at the beginning of the block (e.g., 'rc=0') before any conditional checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.