Only use latest release tag for windows packages
@@ -73,14 +73,14 @@ function bundle_python_runner($buildDir=".\build") {
}
# retrieves the git tag for the currently checked out agent project
-# if the checked out project is not a tag, append a timestamp (seconds since epoch) to the
-# last tag version since msi/choco packages expect the version to be in dot-decimal form
+# if the checked out project is not a tag, append the date to the last tag
+# version since msi/choco packages expect the version to be in dot-decimal form
function getGitTag(){
$version = (git -C "$scriptdir\..\..\" describe --exact-match --tags) # null if no tag found
- if (!$version) {
- $last_tag = (git -C "$scriptdir\..\..\" describe --abbrev=0 --match v[0-9]*)
- $ts = ((Get-Date -UFormat '%s') -as [int])
- $version = "$last_tag" + "." + "$ts"
+ if (!$version -or !($version -match '^v\d+\.\d+\.\d+$')) {
+ $last_tag = (git -C "$scriptdir\..\..\" describe --abbrev=0 --match v[0-9]* --exclude *beta*)
+ $date = Get-Date -UFormat '%Y%m%d'
+ $version = "$last_tag" + "." + "$date"
}
if (!($version -match '^v\d+\.\d+\.\d+(\.\d+)?$')) {
throw "failed to get git tag"
