Skip to content

Commit 88d5338

Browse files
Copilotdennisdoomen
andcommitted
Make published assemblies platform-agnostic
Co-authored-by: dennisdoomen <[email protected]>
1 parent bd76661 commit 88d5338

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

Build/Build.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,19 @@ class Build : NukeBuild
235235
var publishDirectory = ArtifactsDirectory / "publish";
236236
publishDirectory.CreateOrCleanDirectory();
237237

238-
// Publish for win-x64 as a self-contained executable
238+
// Publish as platform-agnostic framework-dependent deployment
239239
DotNetPublish(s => s
240240
.SetProject(Solution.PackageGuard)
241241
.SetConfiguration(Configuration)
242-
.SetRuntime("win-x64")
243-
.EnableSelfContained()
244-
.EnablePublishSingleFile()
245-
.SetOutput(publishDirectory / "win-x64")
242+
.SetOutput(publishDirectory)
246243
.SetVersion(SemVer));
247244

248245
// Create ZIP file
249-
var zipFileName = $"PackageGuard-{SemVer}-win-x64.zip";
246+
var zipFileName = $"PackageGuard-{SemVer}.zip";
250247
var zipFilePath = ArtifactsDirectory / zipFileName;
251248

252249
Information($"Creating ZIP file: {zipFilePath}");
253-
ZipFile.CreateFromDirectory(publishDirectory / "win-x64", zipFilePath, CompressionLevel.Optimal, false);
250+
ZipFile.CreateFromDirectory(publishDirectory, zipFilePath, CompressionLevel.Optimal, false);
254251

255252
ReportSummary(s => s
256253
.AddPair("Binary ZIP", zipFileName));

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ Install as [a NuGet Tool package](https://www.nuget.org/packages/packageguard):
5959

6060
Then use `packageguard --help` to see a list of options.
6161

62-
### As a standalone executable (Windows only)
62+
### As a portable deployment
6363

64-
Download the latest `PackageGuard-{version}-win-x64.zip` from the [releases page](https://github.com/dennisdoomen/packageguard/releases/latest), extract it, and run `PackageGuard.exe` directly. This is a self-contained Windows executable that does not require .NET to be installed.
64+
Download the latest `PackageGuard-{version}.zip` from the [releases page](https://github.com/dennisdoomen/packageguard/releases/latest), extract it, and run it using `dotnet PackageGuard.dll`. This requires .NET 9.0 or later to be installed but works on Windows, Linux, and macOS.
6565

6666
```
6767
USAGE:
68-
packageguard [path] [OPTIONS] # When installed as a global tool
69-
PackageGuard.exe [path] [OPTIONS] # When using the standalone executable
68+
packageguard [path] [OPTIONS] # When installed as a global tool
69+
dotnet PackageGuard.dll [path] [OPTIONS] # When using the portable deployment
7070
7171
ARGUMENTS:
7272
[path] The path to a directory containing a .sln/.slnx file, a specific .sln/.slnx file, or a specific .csproj file. Defaults to the current working

0 commit comments

Comments
 (0)