public static void WriteVersionVariables(this RepositoryFixtureBase fixture, string versionFile) { var versionInfo = fixture.GetVersion(); using var stream = File.Open(versionFile, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite); using var writer = new StreamWriter(stream); writer.Write(versionInfo.ToString()); }
public static void AssertFullSemver(this RepositoryFixtureBase fixture, Config configuration, string fullSemver, IRepository repository = null, string commitId = null, bool onlyTrackedBranches = true, string targetBranch = null) { configuration.Reset(); Console.WriteLine("---------"); try { var variables = fixture.GetVersion(configuration, repository, commitId, onlyTrackedBranches, targetBranch); variables.FullSemVer.ShouldBe(fullSemver); } catch (Exception) { (repository ?? fixture.Repository).DumpGraph(); throw; } if (commitId == null) { fixture.SequenceDiagram.NoteOver(fullSemver, fixture.Repository.Head.FriendlyName, color: "#D3D3D3"); } }
public static void AssertFullSemver(this RepositoryFixtureBase fixture, Config configuration, string fullSemver, IRepository repository = null, string commitId = null, bool isForTrackedBranchOnly = true) { ConfigurationProvider.ApplyDefaultsTo(configuration); Console.WriteLine("---------"); try { var variables = fixture.GetVersion(configuration, repository, commitId, isForTrackedBranchOnly); variables.FullSemVer.ShouldBe(fullSemver); } catch (Exception) { (repository ?? fixture.Repository).DumpGraph(); throw; } if (commitId == null) { fixture.SequenceDiagram.NoteOver(fullSemver, fixture.Repository.Head.FriendlyName, color: "#D3D3D3"); } }