Skip to content

Commit

Permalink
Fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ap0llo committed May 29, 2020
1 parent fab0e06 commit 12c81cc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/NerdBank.GitVersioning/ReleaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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)
Expand All @@ -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}.");
}
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 12c81cc

Please # to comment.