Skip to content

Commit

Permalink
- Fix review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpojer committed Nov 25, 2024
1 parent 995e894 commit e00dc51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ See the default action step definition:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github-repository: "{ org }/{ repo }" # ${{ github.repository }}
github-repository: "{ org }/{ repo }" # e.g. ${{ github.repository }}
version-tag: "v0.1.0"
```
Expand Down
6 changes: 3 additions & 3 deletions version_tag_check/version_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ def is_valid_increment(self) -> bool:
if nv.major == latest_filtered_version.major and nv.minor == latest_filtered_version.minor:
if nv.patch == latest_filtered_version.patch + 1:
return True
logger.error(f"New tag {nv} is not one patch higher than the latest tag {latest_filtered_version}.")
logger.error("New tag %s is not one patch higher than the latest tag %s.", nv, latest_filtered_version)

# Check if this is a valid minor or major bump
if nv.major == latest_version.major:
if nv.minor == latest_version.minor + 1:
if nv.patch == 0:
return True
logger.error(f"New tag {nv} is not a valid minor bump. Latest version: {latest_version}.")
logger.error("New tag %s is not a valid minor bump. Latest version: %s.", nv, latest_version)
elif nv.major == latest_version.major + 1:
if nv.minor == 0 and nv.patch == 0:
return True
logger.error(f"New tag {nv} is not a valid major bump. Latest version: {latest_version}.")
logger.error("New tag %s is not a valid major bump. Latest version: %s.", nv, latest_version)

return False

0 comments on commit e00dc51

Please sign in to comment.