Skip to content

Commit d4b2e3a

Browse files
committed
Fix incorrect VersionSuffix, workaround strange NUKE bug
1 parent 9e1e34a commit d4b2e3a

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ jobs:
3434
Pack
3535
--configuration Release
3636
--msbuild-properties
37-
${{ github.event_name == 'workflow_dispatch' && inputs.release && '' || github.event_name != 'pull_request' && format('VersionSuffix=build{0}.0', github.run_number) || format('VersionSuffix=pr{0}.{1}', github.event.number, github.run_number) }}
38-
ContinuousIntegrationBuild=true
37+
${{ github.event_name == 'workflow_dispatch' && inputs.release && 'ContinuousIntegrationBuild=true' || github.event_name != 'pull_request' && format('ContinuousIntegrationBuild=true VersionSuffix=build{0}.0', github.run_number) || format('ContinuousIntegrationBuild=true VersionSuffix=pr{0}.{1}', github.event.number, github.run_number) }}
3938
- name: Upload Unsigned Artifacts to Actions
4039
uses: actions/upload-artifact@v4
4140
with:

eng/build/Build.Publishing.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,18 @@ private void CommitShippedApi()
233233
Git($"checkout {GitHubActions.Instance.RefName}");
234234
}
235235
Git("add **/PublicAPI.*.txt");
236-
Git("commit -m \"Update public API after release\"");
236+
237+
// Must be an interpolated string even if we're not interpolating because NUKE specially recognises this idfk.
238+
// The issue this caused if you omitted the $ is as follows:
239+
// 20:14:58 [INF] > "C:\Program Files\Git\bin\git.exe" config user.email "[email protected]"
240+
// 20:14:58 [INF] > "C:\Program Files\Git\bin\git.exe" config user.name "The Silk.NET Automaton"
241+
// 20:14:58 [INF] > "C:\Program Files\Git\bin\git.exe" tag v3.0.0-preview
242+
// 20:14:59 [DBG] ...
243+
// 20:15:00 [INF] > "C:\Program Files\Git\bin\git.exe" "commit -m \"Update public API after release\""
244+
// 20:15:00 [DBG] git: 'commit -m "Update public API after release"' is not a git command. See 'git --help'.
245+
// Error: Target "FinishRelease" has thrown an exception
246+
// THE ONLY DISCERNABLE DIFFERENCE BETWEEN THE GIT CONFIG COMMANDS AND GIT COMMIT COMMAND WAS THE LACK OF A $
247+
Git($"commit -m \"Update public API after release\"");
237248
}
238249

239250
private readonly record struct VersionsList(

0 commit comments

Comments
 (0)