Skip to content

Commit 6d26820

Browse files
committed
Make sure tfx is installed before build and only produce artifacts on AppVeyor
1 parent f4d620f commit 6d26820

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

appveyor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
install:
2+
npm i -g tfx-cli
3+
14
assembly_info:
25
patch: false
36

build.cake

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,27 @@ void Build()
1919
{
2020
if(IsRunningOnUnix())
2121
{
22-
XBuild("./src/GitVersion.sln", new XBuildSettings()
22+
XBuild("./src/GitVersion.sln", new XBuildSettings()
2323
.SetConfiguration(configuration)
2424
.WithProperty("POSIX", "True")
25-
.WithProperty("GitVersion_NuGetVersion", nugetVersion)
26-
.WithProperty("GitVersion_SemVer", semVersion)
27-
.SetVerbosity(Verbosity.Verbose)
28-
);
25+
.SetVerbosity(Verbosity.Verbose));
2926
}
3027
else
3128
{
32-
MSBuild("./src/GitVersion.sln", new MSBuildSettings()
29+
var msBuildSettings = new MSBuildSettings()
3330
.SetConfiguration(configuration)
3431
.SetPlatformTarget(PlatformTarget.MSIL)
3532
.WithProperty("Windows", "True")
36-
.WithProperty("GitVersion_NuGetVersion", nugetVersion)
37-
.WithProperty("GitVersion_SemVer", semVersion)
3833
.UseToolVersion(MSBuildToolVersion.VS2015)
3934
.SetVerbosity(Verbosity.Minimal)
40-
.SetNodeReuse(false));
35+
.SetNodeReuse(false);
36+
37+
if (BuildSystem.AppVeyor.IsRunningOnAppVeyor) {
38+
msBuildSettings = msBuildSettings
39+
.WithProperty("GitVersion_NuGetVersion", nugetVersion)
40+
.WithProperty("GitVersion_SemVer", semVersion);
41+
}
42+
MSBuild("./src/GitVersion.sln", msBuildSettings);
4143
}
4244
}
4345

0 commit comments

Comments
 (0)