Skip to content

Commit fe970ff

Browse files
authored
Merge branch 'master' into bugfix/editorconfig
2 parents 5fe1264 + 2d54d05 commit fe970ff

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

build.cake

-10
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,10 @@ Task("Cleanup")
4343
DirectoryHelper.Create(env.Folders.ArtifactsScripts);
4444
});
4545

46-
Task("GitVersion")
47-
.WithCriteria(!BuildSystem.IsLocalBuild)
48-
.WithCriteria(!TFBuild.IsRunningOnTFS)
49-
.Does(() => {
50-
GitVersion(new GitVersionSettings{
51-
OutputType = GitVersionOutput.BuildServer
52-
});
53-
});
54-
5546
/// <summary>
5647
/// Pre-build setup tasks.
5748
/// </summary>
5849
Task("Setup")
59-
.IsDependentOn("GitVersion")
6050
.IsDependentOn("ValidateMono")
6151
.IsDependentOn("InstallDotNetCoreSdk")
6252
.IsDependentOn("InstallMonoAssets")

scripts/common.cake

+16-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,22 @@ public class BuildEnvironment
293293
}
294294
else
295295
{
296-
return context.GitVersion();
296+
try
297+
{
298+
return context.GitVersion();
299+
}
300+
catch
301+
{
302+
context.Warning("GitVersion failed. Setting default version 0.0.1-local");
303+
304+
return new GitVersion
305+
{
306+
NuGetVersion = "0.0.1-local",
307+
AssemblySemVer = "0.0.1.0",
308+
InformationalVersion = "0.0.1-local",
309+
SemVer = "0.0.1-local"
310+
};
311+
}
297312
}
298313
}
299314

0 commit comments

Comments
 (0)