Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 244a107

Browse files
committed
Fix AzureDevOps detection
1 parent a212770 commit 244a107

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build.cake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,12 @@ Task ("ci-setup")
191191
var buildNumber = "DEBUG";
192192
var buildTimestamp = DateTime.UtcNow.ToString ();
193193

194+
194195
if (BuildSystem.IsRunningOnJenkins) {
195196
buildNumber = BuildSystem.Jenkins.Environment.Build.BuildTag;
196197
buildCommit = EnvironmentVariable("GIT_COMMIT") ?? buildCommit;
197-
} else if (BuildSystem.IsRunningOnVSTS) {
198+
} else if (!string.IsNullOrWhiteSpace(EnvironmentVariable("TF_BUILD"))) {
199+
// Running on AzureDevOps
198200
buildNumber = BuildSystem.TFBuild.Environment.Build.Number;
199201
buildCommit = BuildSystem.TFBuild.Environment.Repository.SourceVersion;
200202
}

0 commit comments

Comments
 (0)