Skip to content

Commit 6a0262c

Browse files
committed
Remove build number from AppVeyor
- Build Variables are not available during deployment, so the build number is the only way to communicate the version to the release - At the moment, the build number is not SemVer. This breaks github release tagging - Fixes #723
1 parent 689fd20 commit 6a0262c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/GitVersionCore/BuildServers/AppVeyor.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ public override bool CanApplyToCurrentContext()
1313

1414
public override string GenerateSetVersionMessage(VersionVariables variables)
1515
{
16-
var buildNumber = Environment.GetEnvironmentVariable("APPVEYOR_BUILD_NUMBER");
17-
1816
var restBase = Environment.GetEnvironmentVariable("APPVEYOR_API_URL");
1917

2018
var request = (HttpWebRequest)WebRequest.Create(restBase + "api/build");
2119
request.Method = "PUT";
2220

23-
var data = string.Format("{{ \"version\": \"{0} (Build {1})\" }}", variables.FullSemVer, buildNumber);
21+
var data = string.Format("{{ \"version\": \"{0}\" }}", variables.FullSemVer);
2422
var bytes = Encoding.UTF8.GetBytes(data);
2523
request.ContentLength = bytes.Length;
2624
request.ContentType = "application/json";
@@ -39,7 +37,7 @@ public override string GenerateSetVersionMessage(VersionVariables variables)
3937
}
4038
}
4139

42-
return string.Format("Set AppVeyor build number to '{0} (Build {1})'.", variables.FullSemVer, buildNumber);
40+
return string.Format("Set AppVeyor build number to '{0}'.", variables.FullSemVer);
4341
}
4442

4543
public override string[] GenerateSetParameterMessage(string name, string value)

0 commit comments

Comments
 (0)