public static void UpdateProjectVersion() { var baseDirectory = Directory.GetCurrentDirectory(); var buildNumber = VersionUtil.GetBuildNumber(); var revNumber = VersionUtil.GetRevNumber(); var projectVersion = $"222.6.{buildNumber}.{revNumber}"; Environment.SetEnvironmentVariable("VERSION_NUMBER", projectVersion); RunRecursive(baseDirectory: baseDirectory, version: projectVersion); var envVersionNumber = Environment.GetEnvironmentVariable("VERSION_NUMBER"); Console.WriteLine($"Project version updated to {projectVersion}"); Console.WriteLine($"Environment variable VERSION_NUMBER set to {envVersionNumber}"); var appVeyorConfig = new AppVeyorConfig() { Version = projectVersion, Environment = new AppVeyorEnvironment() { VersionNumber = projectVersion } }; var configYaml = appVeyorConfig.ToYaml(); Console.WriteLine("Writing AppVeyor config..."); configYaml.ToFile("appveyor.yml").WaitAndUnwrapException(); }
public override bool Execute() { var buildNumber = VersionUtil.GetBuildNumber(); var revNumber = VersionUtil.GetRevNumber(); Version = $"1.0.{buildNumber}.{revNumber}"; Log.LogMessage($"Version: {Version}"); return(true); }
public void RevNumberTest() { var revNumber = VersionUtil.GetRevNumber(); revNumber.Should().BeGreaterThan(0); }