Skip to content

Commit

Permalink
Fix RuntimeIdentifiers handling in build scripts (#1247)
Browse files Browse the repository at this point in the history
* fix: comment out RuntimeIdentifiers in Directory.Build.props

* fix: uncomment RuntimeIdentifiers in Directory.Build.props and update build script to set RuntimeIdentifiers property
  • Loading branch information
yuto-trd authored Jan 8, 2025
1 parent d0dc6e5 commit f575679
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nukebuild/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ private string GetTFM()

DotNetPublish(s => s
.EnableNoRestore()
.When(_ => Runtime != null, s => s.SetRuntime(Runtime).SetSelfContained(SelfContained))
.When(_ => Runtime != null, s => s
.SetRuntime(Runtime)
.SetSelfContained(SelfContained)
.SetProperty("RuntimeIdentifiers", Runtime.ToString()))
.When(_ => Runtime == RuntimeIdentifier.win_x64, s => s.SetFramework($"{tfm}-windows"))
.When(_ => Runtime != RuntimeIdentifier.win_x64, s => s.SetFramework(tfm))
.SetConfiguration(Configuration)
Expand All @@ -100,7 +103,10 @@ private string GetTFM()
{
AbsolutePath output = OutputDirectory / item;
DotNetPublish(s => s
.When(_ => Runtime != null, s => s.SetRuntime(Runtime).SetSelfContained(SelfContained))
.When(_ => Runtime != null, s => s
.SetRuntime(Runtime)
.SetSelfContained(SelfContained)
.SetProperty("RuntimeIdentifiers", Runtime.ToString()))
.When(_ => Runtime == RuntimeIdentifier.win_x64, s => s.SetFramework($"{tfm}-windows"))
.When(_ => Runtime != RuntimeIdentifier.win_x64, s => s.SetFramework(tfm))
.EnableNoRestore()
Expand Down

0 comments on commit f575679

Please sign in to comment.