From a58c63c59642cd24a43b96640c88e07864ba63a4 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Thu, 29 Apr 2021 17:41:15 -0400 Subject: [PATCH] use a nuspec --- .gitignore | 1 + azure-pipelines.yml | 21 ++++++---- .../DotNet.ReproducibleBuilds.csproj | 38 +++++++------------ .../DotNet.ReproducibleBuilds.nuspec | 27 +++++++++++++ 4 files changed, 55 insertions(+), 32 deletions(-) create mode 100644 src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.nuspec diff --git a/.gitignore b/.gitignore index 1332d90..0bf7ec0 100644 --- a/.gitignore +++ b/.gitignore @@ -285,3 +285,4 @@ __pycache__/ *.btm.cs *.odx.cs *.xsd.cs +*.binlog diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1daed61..aa27eac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,14 +33,19 @@ stages: - script: nbgv cloud displayName: Set Version - - task: DotNetCoreCLI@2 - inputs: - command: pack - packagesToPack: src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.csproj - configuration: $(BuildConfiguration) - packDirectory: $(Build.ArtifactStagingDirectory)\Packages - verbosityPack: Minimal - displayName: Build Package + - task: NuGetToolInstaller@1 + + - pwsh: | + mkdir $(Build.ArtifactStagingDirectory)\Packages + $version = .\nbgv get-version -f json | ConvertFrom-Json + + nuget pack DotNet.ReproducibleBuilds.nuspec` + -outputdirectory $(Build.ArtifactStagingDirectory)\Packages ` + -basepath $(System.DefaultWorkingDirectory)\src\DotNet.ReproducibleBuilds ` + -NoPackageAnalysis ` + -Properties "version=$($version.NuGetPackageVersion);RepositoryCommit=$($version.GitCommitId)" + + displayName: Create package - publish: $(Build.ArtifactStagingDirectory)\Packages displayName: Publish build packages diff --git a/src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.csproj b/src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.csproj index 19be7ab..7cd81a7 100644 --- a/src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.csproj +++ b/src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.csproj @@ -11,40 +11,30 @@ false false false + DotNet.ReproducibleBuilds.nuspec - - - .NET Foundation and Contributors - © .NET Foundation - true - https://github.com/dotnet/reproducible-builds - https://github.com/dotnet/reproducible-builds/blob/main/LICENSE - https://github.com/dotnet/reproducible-builds/blob/main/README.md - - + - - - - - - - - + + + $(BuildVersion) + $(BuildVersion) + $(BuildVersion) + $(BuildVersionSimple) + $(BuildVersionSimple) - - - - - - + version=$(NuGetPackageVersion);RepositoryType=git;RepositoryCommit=$(GitCommitId);RepositoryUrl=$(GitRepositoryUrl) + + + + diff --git a/src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.nuspec b/src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.nuspec new file mode 100644 index 0000000..180d8d1 --- /dev/null +++ b/src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.nuspec @@ -0,0 +1,27 @@ + + + + DotNet.ReproducibleBuilds + $version$ + .NET Foundation and Contributors + true + https://github.com/dotnet/reproducible-builds/blob/main/LICENSE + https://github.com/dotnet/reproducible-builds + Enables reproducible build settings + https://github.com/dotnet/reproducible-builds/blob/main/README.md + © .NET Foundation + + + + + + + + + + + + + + + \ No newline at end of file