From 12c81cc696be558995ff5d68314d3226ac42c2f9 Mon Sep 17 00:00:00 2001 From: Andreas Gruenwald Date: Fri, 29 May 2020 17:52:56 +0200 Subject: [PATCH] Fix formatting issues --- src/NerdBank.GitVersioning/ReleaseManager.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/NerdBank.GitVersioning/ReleaseManager.cs b/src/NerdBank.GitVersioning/ReleaseManager.cs index 1749e18e..a534cb18 100644 --- a/src/NerdBank.GitVersioning/ReleaseManager.cs +++ b/src/NerdBank.GitVersioning/ReleaseManager.cs @@ -115,11 +115,11 @@ public ReleaseInfo(ReleaseBranchInfo currentBranch) : this(currentBranch, null) [JsonConstructor] public ReleaseInfo(ReleaseBranchInfo currentBranch, ReleaseBranchInfo newBranch) { - Requires.NotNull(currentBranch, nameof(currentBranch)); + Requires.NotNull(currentBranch, nameof(currentBranch)); // skip null check for newBranch, it is allowed to be null. - this.CurrentBranch = currentBranch; - this.NewBranch = newBranch; + this.CurrentBranch = currentBranch; + this.NewBranch = newBranch; } } @@ -235,7 +235,7 @@ public void PrepareRelease(string projectDirectory, string releaseUnstableTag = this.stderr.WriteLine($"Failed to load version file for directory '{projectDirectory}'."); throw new ReleasePreparationException(ReleasePreparationError.NoVersionFile); } - + var releaseBranchName = this.GetReleaseBranchName(versionOptions); var originalBranchName = repository.Head.FriendlyName; var releaseVersion = string.IsNullOrEmpty(releaseUnstableTag) @@ -245,7 +245,7 @@ public void PrepareRelease(string projectDirectory, string releaseUnstableTag = // check if the current branch is the release branch if (string.Equals(originalBranchName, releaseBranchName, StringComparison.OrdinalIgnoreCase)) { - if(outputMode == ReleaseManagerOutputMode.Text) + if (outputMode == ReleaseManagerOutputMode.Text) { this.stdout.WriteLine($"{releaseBranchName} branch advanced from {versionOptions.Version} to {releaseVersion}."); } @@ -281,9 +281,9 @@ public void PrepareRelease(string projectDirectory, string releaseUnstableTag = Commands.Checkout(repository, originalBranchName); this.UpdateVersion(projectDirectory, repository, versionOptions.Version, nextDevVersion); - if(outputMode == ReleaseManagerOutputMode.Text) + if (outputMode == ReleaseManagerOutputMode.Text) { - this.stdout.WriteLine($"{originalBranchName} branch now tracks v{nextDevVersion} development."); + this.stdout.WriteLine($"{originalBranchName} branch now tracks v{nextDevVersion} development."); } // Merge release branch back to main branch @@ -294,14 +294,14 @@ public void PrepareRelease(string projectDirectory, string releaseUnstableTag = }; repository.Merge(releaseBranch, this.GetSignature(repository), mergeOptions); - if(outputMode == ReleaseManagerOutputMode.Json) + if (outputMode == ReleaseManagerOutputMode.Json) { var originalBranchInfo = new ReleaseBranchInfo(originalBranchName, repository.Head.Tip.Sha, nextDevVersion); var releaseBranchInfo = new ReleaseBranchInfo(releaseBranchName, repository.Branches[releaseBranchName].Tip.Id.ToString(), releaseVersion); var releaseInfo = new ReleaseInfo(originalBranchInfo, releaseBranchInfo); this.WriteToOutput(releaseInfo); - } + } } private string GetReleaseBranchName(VersionOptions versionOptions) @@ -409,7 +409,7 @@ private SemanticVersion GetNextDevVersion(VersionOptions versionOptions, Version var currentVersion = versionOptions.Version; SemanticVersion nextDevVersion; - if(nextVersionOverride != null) + if (nextVersionOverride != null) { nextDevVersion = new SemanticVersion(nextVersionOverride, currentVersion.Prerelease, currentVersion.BuildMetadata); }