Skip to content

Commit

Permalink
Directory.Build.props: Added SourceLink support and deterministic bui…
Browse files Browse the repository at this point in the history
  • Loading branch information
NightOwl888 committed Dec 27, 2021
1 parent 015c537 commit fe4c0ff
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
22 changes: 20 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PropertyGroup>
<LangVersion>9.0</LangVersion>
</PropertyGroup>

<!-- IMPORTANT: When these values are changed, the CI counter number should also be reset. -->
<PropertyGroup Label="Version of Builds">
<!-- IMPORTANT: VersionPrefix must always be the same as the Lucene version this is based on.
Expand Down Expand Up @@ -54,7 +54,7 @@
<!-- This is the new symbols format (the only one currently supported at NuGet.org) -->
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<PropertyGroup Label="Copyright Info">
<Product>Lucene.Net</Product>
<Company>The Apache Software Foundation</Company>
Expand All @@ -65,6 +65,24 @@
<Copyright>Copyright © $(CopyrightYearRange) $(Company)</Copyright>
</PropertyGroup>

<PropertyGroup Label="SourceLink Settings: https://github.com/dotnet/sourcelink/blob/main/README.md">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<PropertyGroup Condition=" '$(BUILD_REPOSITORY_PROVIDER)' == 'GitHub' Or '$(BUILD_REPOSITORY_PROVIDER)' == 'TfsGit' " Label="Deterministic builds: https://github.com/clairernovotny/DeterministicBuilds#readme">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- This is for testing only, we use SourceLink from any Azure DevOps git repo -->
<ItemGroup Condition=" '$(BUILD_REPOSITORY_PROVIDER)' == 'TfsGit' " Label="SourceLink Packages (experimental Azure Repos)">
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup Condition=" '$(BUILD_REPOSITORY_PROVIDER)' == 'GitHub' " Label="SourceLink Packages (main repo)">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

<!-- Settings to override the above Version of Builds. These can be used to
"freeze" the build number for a release, so whether building within
an IDE or from the commmand line, the version is always what is
Expand Down
1 change: 0 additions & 1 deletion build/NuGet.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<IsPackable>true</IsPackable>
<PackageTags>lucene.net;core;text;search;information;retrieval;lucene;apache;analysis;index;query</PackageTags>
<Authors>The Apache Software Foundation</Authors>
<RepositoryUrl>https://github.com/apache/lucenenet</RepositoryUrl>
<PackageProjectUrl>https://lucenenet.apache.org</PackageProjectUrl>
<PackageIcon>lucene-net-icon-128x128.png</PackageIcon>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down

0 comments on commit fe4c0ff

Please sign in to comment.