strip v prefix in tag name in azure-pipeline (#2048)

This commit is contained in:
blotus 2023-02-09 14:17:49 +01:00 committed by GitHub
parent ebd709a4fe
commit 6c15da4ece
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,10 @@ stages:
displayName: "Sign Crowdsec binaries + plugins" displayName: "Sign Crowdsec binaries + plugins"
- pwsh: | - pwsh: |
$build_version=$env:BUILD_SOURCEBRANCHNAME $build_version=$env:BUILD_SOURCEBRANCHNAME
if ($build_version.StartsWith("v"))
{
$build_version = $build_version.Substring(1)
}
if ($build_version.Contains("-")) if ($build_version.Contains("-"))
{ {
$build_version = $build_version.Substring(0, $build_version.IndexOf("-")) $build_version = $build_version.Substring(0, $build_version.IndexOf("-"))