Skip to content

Commit

Permalink
Fix maven pre-deploy snapshot version validation: require SemVer-SHA (#…
Browse files Browse the repository at this point in the history
…398)

## What is the goal of this PR?

Fix regression introduced in #397: prepending `0.0.0-` to the commit SHA
for snapshot assembly broke the validation in the deployment script,
which expects either bare SHA or any string ending with `-SNAPSHOT`. We
now require either a major.minor.patch version with the SHA at the end,
or any string ending with `-SNAPSHOT`.
  • Loading branch information
dmitrii-ubskii authored Jan 29, 2024
1 parent ad6cc19 commit 1a507e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maven/templates/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def unpack_args(_, a, b=False):
version = version.text

snapshot = 'snapshot'
version_snapshot_regex = '^[0-9|a-f|A-F]{40}$|.*-SNAPSHOT$'
version_snapshot_regex = '^[0-9]+.[0-9]+.[0-9]+-[0-9|a-f|A-F]{40}$|.*-SNAPSHOT$'
release = 'release'
version_release_regex = '^[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]+)*$'

Expand Down

0 comments on commit 1a507e7

Please sign in to comment.