Only let in tags starting with "v" (#328)

This commit is contained in:
Matt
2021-11-23 20:22:54 -05:00
committed by GitHub
parent f103a6b712
commit 23834c87f4

View File

@@ -8,13 +8,14 @@ gradle.allprojects {
String tagIsh
try {
exec {
commandLine 'git', 'describe', '--tags', '--exclude="[dD]ev*"'
commandLine 'git', 'describe', '--tags', "--match=v*"
standardOutput = stdout
}
tagIsh = stdout.toString().trim().toLowerCase()
} catch (Exception e) {
tagIsh = "dev-Unknown"
}
// Dev tags: v2021.1.6-3-gf922466d
// We're specifically looking to capture the middle -3-
boolean isDev = tagIsh.matches(".*-[0-9]*-g[0-9a-f]*")