use a nuspec
This commit is contained in:
Родитель
83c38988cb
Коммит
a58c63c596
|
@ -285,3 +285,4 @@ __pycache__/
|
|||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
*.binlog
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -11,40 +11,30 @@
|
|||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||
<GenerateAssemblyVersionInfo>false</GenerateAssemblyVersionInfo>
|
||||
<NuspecFile>DotNet.ReproducibleBuilds.nuspec</NuspecFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="PackageInfo">
|
||||
<Authors>.NET Foundation and Contributors</Authors>
|
||||
<Copyright>© .NET Foundation</Copyright>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<PackageProjectUrl>https://github.com/dotnet/reproducible-builds</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://github.com/dotnet/reproducible-builds/blob/main/LICENSE</PackageLicenseUrl>
|
||||
<PackageReleaseNotes>https://github.com/dotnet/reproducible-builds/blob/main/README.md</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<IntermediateAssembly Remove="@(IntermediateAssembly)"/>
|
||||
<IntermediateRefAssembly Remove="@(IntermediateRefAssembly)"/>
|
||||
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.SourceLink.AzureDevOpsServer.Git" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitLab" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.SourceLink.Bitbucket.Git" Version="1.0.0" />
|
||||
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.194" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="SetBuildVer" AfterTargets="GetBuildVersion" BeforeTargets="SetCloudBuildVersionVars;SetCloudBuildNumberWithVersion">
|
||||
<PropertyGroup>
|
||||
<CloudBuildNumber>$(BuildVersion)</CloudBuildNumber>
|
||||
<Version>$(BuildVersion)</Version>
|
||||
<PackageVersion>$(BuildVersion)</PackageVersion>
|
||||
<NuGetPackageVersion>$(BuildVersionSimple)</NuGetPackageVersion>
|
||||
<AssemblyVersion>$(BuildVersionSimple)</AssemblyVersion>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="DotNet.ReproducibleBuilds.props" Pack="true" PackagePath="build" />
|
||||
<None Include="DotNet.ReproducibleBuilds.targets" Pack="true" PackagePath="build" />
|
||||
<None Include="DotNet.ReproducibleBuilds.props" Pack="true" PackagePath="buildMultiTargeting" />
|
||||
<None Include="DotNet.ReproducibleBuilds.targets" Pack="true" PackagePath="buildMultiTargeting" />
|
||||
</ItemGroup>
|
||||
<NuspecProperties>version=$(NuGetPackageVersion);RepositoryType=git;RepositoryCommit=$(GitCommitId);RepositoryUrl=$(GitRepositoryUrl)</NuspecProperties>
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>DotNet.ReproducibleBuilds</id>
|
||||
<version>$version$</version>
|
||||
<authors>.NET Foundation and Contributors</authors>
|
||||
<developmentDependency>true</developmentDependency>
|
||||
<licenseUrl>https://github.com/dotnet/reproducible-builds/blob/main/LICENSE</licenseUrl>
|
||||
<projectUrl>https://github.com/dotnet/reproducible-builds</projectUrl>
|
||||
<description>Enables reproducible build settings</description>
|
||||
<releaseNotes>https://github.com/dotnet/reproducible-builds/blob/main/README.md</releaseNotes>
|
||||
<copyright>© .NET Foundation</copyright>
|
||||
<repository type="git" url="https://github.com/dotnet/reproducible-builds" commit="$RepositoryCommit$" />
|
||||
<dependencies>
|
||||
<dependency id="Microsoft.SourceLink.AzureDevOpsServer.Git" version="1.0.0" />
|
||||
<dependency id="Microsoft.SourceLink.AzureRepos.Git" version="1.0.0" />
|
||||
<dependency id="Microsoft.SourceLink.Bitbucket.Git" version="1.0.0" />
|
||||
<dependency id="Microsoft.SourceLink.GitLab" version="1.0.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="DotNet.ReproducibleBuilds.props" target="build\DotNet.ReproducibleBuilds.props" />
|
||||
<file src="DotNet.ReproducibleBuilds.props" target="buildMultiTargeting\DotNet.ReproducibleBuilds.props" />
|
||||
<file src="DotNet.ReproducibleBuilds.targets" target="build\DotNet.ReproducibleBuilds.targets" />
|
||||
<file src="DotNet.ReproducibleBuilds.targets" target="buildMultiTargeting\DotNet.ReproducibleBuilds.targets" />
|
||||
</files>
|
||||
</package>
|
Загрузка…
Ссылка в новой задаче