Example #1
0
 public static GitVersion Run(Context context, GitVersionOutput outputType)
 {
     return(context.GitVersion(new GitVersionSettings
     {
         OutputType = outputType,
         ToolPath = context.GitVersionToolPath
     }));
 }
Example #2
0
 public static GitVersion Run(ICakeContext context, GitVersionOutput outputType)
 {
     if (context.IsRunningOnWindows())
     {
         return(context.GitVersion(new GitVersionSettings
         {
             OutputType = outputType
         }));
     }
     else
     {
         // On non windows platform, point the GitVersion task at our wrapper script that uses mono to run GitVersion.exe
         context.Information("Overriding GitVersion ToolPath to /bin/sh ./tools/gitversion_wrapper.sh");
         return(context.GitVersion(new GitVersionSettings
         {
             OutputType = outputType,
             ToolPath = "/bin/sh",
             ArgumentCustomization = args => args.Prepend("./tools/gitversion_wrapper.sh")
         }));
     }
 }
Example #3
0
 /// <summary>
 /// Determines the output to the console. Can be either 'json' or 'buildserver', will default to 'json'.
 /// </summary>
 /// <param name="output"></param>
 /// <returns></returns>
 public GitVersionTask Output(GitVersionOutput output)
 {
     WithArguments("/output", output.ToString().ToLower());
     return(this);
 }
Example #4
0
 public GitVersionTask Output(GitVersionOutput output)
 {
     WithArgumentsKeyFromAttribute(output.ToString().ToLower());
     return(this);
 }