Skip to content

Commit daf3433

Browse files
Merge pull request #144 from nextcloud/chore/add-tag-validator
chore(tagger): add tag format check
2 parents 5c3d2d4 + 8359267 commit daf3433

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tagger/tag.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
}
55
$originalBranch = $argv[1];
66
$tag = $argv[2];
7+
if (!preg_match('/^v[1-9]\d+\.\d+\.\d+(?:(?:alpha|beta|rc)\d+)?$/', $tag)) {
8+
die('Invalid tag format. It should be vXX.Y.Z[alphaX|betaX|rcX]');
9+
}
710

811
// to the rescue, when tagging a release was forgotten
912
// call it with the date of the release tar ball. This can be received from the download server via, e.g.

0 commit comments

Comments
 (0)