Skip to content

Commit 7d4f66c

Browse files
committed
GH-2162 add second #vso[task.setvariable for azure pipelines
1 parent 41660c1 commit 7d4f66c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/GitVersionCore.Tests/BuildServers/AzurePipelinesTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public void EscapeValues()
4949
{
5050
var vsVersion = buildServer.GenerateSetParameterMessage("Foo", "0.8.0-unstable568 Branch:'develop' Sha:'ee69bff1087ebc95c6b43aa2124bd58f5722e0cb'");
5151

52-
vsVersion[0].ShouldBe("##vso[task.setvariable variable=GitVersion.Foo;isOutput=true]0.8.0-unstable568 Branch:'develop' Sha:'ee69bff1087ebc95c6b43aa2124bd58f5722e0cb'");
52+
vsVersion.ShouldContain("##vso[task.setvariable variable=GitVersion.Foo]0.8.0-unstable568 Branch:'develop' Sha:'ee69bff1087ebc95c6b43aa2124bd58f5722e0cb'");
53+
vsVersion.ShouldContain("##vso[task.setvariable variable=GitVersion.Foo;isOutput=true]0.8.0-unstable568 Branch:'develop' Sha:'ee69bff1087ebc95c6b43aa2124bd58f5722e0cb'");
5354
}
5455

5556
[Test]

src/GitVersionCore/BuildServers/AzurePipelines.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public override string[] GenerateSetParameterMessage(string name, string value)
2121
{
2222
return new[]
2323
{
24+
$"##vso[task.setvariable variable=GitVersion.{name}]{value}",
2425
$"##vso[task.setvariable variable=GitVersion.{name};isOutput=true]{value}"
2526
};
2627
}

0 commit comments

Comments
 (0)