From 2c4ce8a7771b849c39071d6260820750b898264d Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 22 Oct 2024 18:16:40 +0200 Subject: [PATCH] Include commit SHA in `NetVips.Native*` packages --- build/Build.cs | 5 +++++ build/native/NetVips.Native.linux-arm.nuspec | 2 +- build/native/NetVips.Native.linux-arm64.nuspec | 2 +- build/native/NetVips.Native.linux-musl-arm64.nuspec | 2 +- build/native/NetVips.Native.linux-musl-x64.nuspec | 2 +- build/native/NetVips.Native.linux-x64.nuspec | 2 +- build/native/NetVips.Native.nuspec | 2 +- build/native/NetVips.Native.osx-arm64.nuspec | 2 +- build/native/NetVips.Native.osx-x64.nuspec | 2 +- build/native/NetVips.Native.win-arm64.nuspec | 2 +- build/native/NetVips.Native.win-x64.net452.nuspec | 2 +- build/native/NetVips.Native.win-x64.nuspec | 2 +- build/native/NetVips.Native.win-x86.net452.nuspec | 2 +- build/native/NetVips.Native.win-x86.nuspec | 2 +- 14 files changed, 18 insertions(+), 13 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index 2d3885c0..64b4299c 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -4,6 +4,7 @@ using System.Runtime.InteropServices; using Nuke.Common; using Nuke.Common.Execution; +using Nuke.Common.Git; using Nuke.Common.IO; using Nuke.Common.ProjectModel; using Nuke.Common.Tooling; @@ -158,9 +159,12 @@ protected override void OnBuildInitialized() .DependsOn(DownloadBinaries) .Executes(() => { + var commitSha = GitRepository.FromLocalDirectory(RootDirectory).Commit; + // Build the architecture specific packages NuGetPack(c => c .SetVersion(VipsVersion) + .AddProperty("commit", commitSha) .SetOutputDirectory(ArtifactsDirectory) .AddProperty("NoWarn", "NU5128") .CombineWith(NuGetArchitectures, @@ -171,6 +175,7 @@ protected override void OnBuildInitialized() NuGetPack(c => c .SetTargetPath(RootDirectory / "build/native/NetVips.Native.nuspec") .SetVersion(VipsVersion) + .AddProperty("commit", commitSha) .SetOutputDirectory(ArtifactsDirectory) .AddProperty("NoWarn", "NU5128")); }); diff --git a/build/native/NetVips.Native.linux-arm.nuspec b/build/native/NetVips.Native.linux-arm.nuspec index 0451a10c..da091816 100644 --- a/build/native/NetVips.Native.linux-arm.nuspec +++ b/build/native/NetVips.Native.linux-arm.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Linux (ARMv7) Native binaries of libvips for Linux (ARMv7) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.linux-arm64.nuspec b/build/native/NetVips.Native.linux-arm64.nuspec index 851791d1..52c57864 100644 --- a/build/native/NetVips.Native.linux-arm64.nuspec +++ b/build/native/NetVips.Native.linux-arm64.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Linux (ARM64v8) Native binaries of libvips for Linux (ARM64v8) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.linux-musl-arm64.nuspec b/build/native/NetVips.Native.linux-musl-arm64.nuspec index ee36a3ae..bdea6dfa 100644 --- a/build/native/NetVips.Native.linux-musl-arm64.nuspec +++ b/build/native/NetVips.Native.linux-musl-arm64.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Linux musl (ARM64v8) Native binaries of libvips for Linux musl (ARM64v8) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.linux-musl-x64.nuspec b/build/native/NetVips.Native.linux-musl-x64.nuspec index ae087d69..3248805c 100644 --- a/build/native/NetVips.Native.linux-musl-x64.nuspec +++ b/build/native/NetVips.Native.linux-musl-x64.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Linux musl (x64) Native binaries of libvips for Linux musl (x64) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.linux-x64.nuspec b/build/native/NetVips.Native.linux-x64.nuspec index caa04483..14c27f90 100644 --- a/build/native/NetVips.Native.linux-x64.nuspec +++ b/build/native/NetVips.Native.linux-x64.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Linux (x64) Native binaries of libvips for Linux (x64) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.nuspec b/build/native/NetVips.Native.nuspec index 2c89beea..706bbb64 100644 --- a/build/native/NetVips.Native.nuspec +++ b/build/native/NetVips.Native.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips Native binaries of libvips https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.osx-arm64.nuspec b/build/native/NetVips.Native.osx-arm64.nuspec index 74bf7cd9..4ebb0fc0 100644 --- a/build/native/NetVips.Native.osx-arm64.nuspec +++ b/build/native/NetVips.Native.osx-arm64.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for macOS (ARM64) Native binaries of libvips for macOS (ARM64) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.osx-x64.nuspec b/build/native/NetVips.Native.osx-x64.nuspec index ce4a5866..3070ed63 100644 --- a/build/native/NetVips.Native.osx-x64.nuspec +++ b/build/native/NetVips.Native.osx-x64.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for macOS (x64) Native binaries of libvips for macOS (x64) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.win-arm64.nuspec b/build/native/NetVips.Native.win-arm64.nuspec index b9d39acf..7808e29b 100644 --- a/build/native/NetVips.Native.win-arm64.nuspec +++ b/build/native/NetVips.Native.win-arm64.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Windows (ARM64) Native binaries of libvips for Windows (ARM64) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.win-x64.net452.nuspec b/build/native/NetVips.Native.win-x64.net452.nuspec index 797f9649..a82cdefd 100644 --- a/build/native/NetVips.Native.win-x64.net452.nuspec +++ b/build/native/NetVips.Native.win-x64.net452.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Windows (x64) Native binaries of libvips for Windows (x64) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.win-x64.nuspec b/build/native/NetVips.Native.win-x64.nuspec index 83e169b4..927624de 100644 --- a/build/native/NetVips.Native.win-x64.nuspec +++ b/build/native/NetVips.Native.win-x64.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Windows (x64) Native binaries of libvips for Windows (x64) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.win-x86.net452.nuspec b/build/native/NetVips.Native.win-x86.net452.nuspec index 45458461..3454297e 100644 --- a/build/native/NetVips.Native.win-x86.net452.nuspec +++ b/build/native/NetVips.Native.win-x86.net452.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Windows (x86) Native binaries of libvips for Windows (x86) https://kleisauke.github.io/net-vips - + libvips binaries image-processing diff --git a/build/native/NetVips.Native.win-x86.nuspec b/build/native/NetVips.Native.win-x86.nuspec index 58cd142f..d86e0062 100644 --- a/build/native/NetVips.Native.win-x86.nuspec +++ b/build/native/NetVips.Native.win-x86.nuspec @@ -9,7 +9,7 @@ This package complements the NetVips package and contains native binaries of libvips for Windows (x86) Native binaries of libvips for Windows (x86) https://kleisauke.github.io/net-vips - + libvips binaries image-processing