File tree 2 files changed +16
-11
lines changed
2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -43,20 +43,10 @@ Task("Cleanup")
43
43
DirectoryHelper . Create ( env . Folders . ArtifactsScripts ) ;
44
44
} ) ;
45
45
46
- Task ( "GitVersion" )
47
- . WithCriteria ( ! BuildSystem . IsLocalBuild )
48
- . WithCriteria ( ! TFBuild . IsRunningOnTFS )
49
- . Does ( ( ) => {
50
- GitVersion ( new GitVersionSettings {
51
- OutputType = GitVersionOutput . BuildServer
52
- } ) ;
53
- } ) ;
54
-
55
46
/// <summary>
56
47
/// Pre-build setup tasks.
57
48
/// </summary>
58
49
Task ( "Setup" )
59
- . IsDependentOn ( "GitVersion" )
60
50
. IsDependentOn ( "ValidateMono" )
61
51
. IsDependentOn ( "InstallDotNetCoreSdk" )
62
52
. IsDependentOn ( "InstallMonoAssets" )
Original file line number Diff line number Diff line change @@ -293,7 +293,22 @@ public class BuildEnvironment
293
293
}
294
294
else
295
295
{
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
+ }
297
312
}
298
313
}
299
314
You can’t perform that action at this time.
0 commit comments