Skip to content

Commit 1e8238e

Browse files
committed
Simplify and fix move-analyzer-rules.
1 parent b659408 commit 1e8238e

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
# --- Analyzer Rules and Next Version ---
5858

5959
- name: Move analyzer rules
60-
run: ./build.cmd move-analyzer-rules --current-version v${{ steps.version.outputs.VERSION }}
60+
run: ./build.cmd move-analyzer-rules
6161

6262
- name: Generate changelog
6363
run: ./build.cmd docs-generate --stable

build/BenchmarkDotNet.Build/Options/KnownOptions.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ public static class KnownOptions
4747
Aliases = new[] { "-s" }
4848
};
4949

50-
public static readonly StringOption CurrentVersion = new("--current-version")
51-
{
52-
Description = "Specifies current version number"
53-
};
54-
5550
public static readonly StringOption NextVersion = new("--next-version")
5651
{
5752
Description = "Specifies next version number",

build/BenchmarkDotNet.Build/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,9 @@ public HelpInfo GetHelp()
186186
{
187187
return new HelpInfo
188188
{
189-
Options = [KnownOptions.CurrentVersion],
190189
Examples =
191190
[
192191
new Example(Name)
193-
.WithArgument(KnownOptions.CurrentVersion, "v0.15.8")
194192
]
195193
};
196194
}

build/BenchmarkDotNet.Build/Runners/DocumentationRunner.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void MoveAnalyzerRules()
5656
string tempFile = System.IO.Path.GetTempFileName();
5757
using (var writer = new StreamWriter(tempFile))
5858
{
59-
writer.WriteLine($"## {KnownOptions.CurrentVersion.Resolve(context)}");
59+
writer.WriteLine($"## v{context.VersionHistory.CurrentVersion}");
6060
CopyLines(writer, analyzersUnshippedFile);
6161
writer.WriteLine();
6262
writer.WriteLine();
@@ -126,6 +126,7 @@ private void GenerateIndexMd()
126126

127127
private void GenerateAnalyzersPage()
128128
{
129+
context.EnsureDirectoryExists(analyzersPageFile.GetDirectory());
129130
using var writer = new StreamWriter(analyzersPageFile.FullPath);
130131
writer.WriteLine($"# Roslyn Analyzers for C#");
131132
writer.WriteLine();

0 commit comments

Comments
 (0)