This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch sourcelink-experiment in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit f2754cf3adb50c095be842a610cb3933f6811ac2 Author: Shad Storhaug <[email protected]> AuthorDate: Fri Dec 24 02:21:08 2021 +0700 Directory.Build.props: Added SourceLink support and deterministic builds: https://github.com/dotnet/sourcelink/blob/main/README.md --- Directory.Build.props | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 532a8c6..8a9e330 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -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. @@ -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> @@ -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' And $(BUILD_REPOSITORY_URI.Contains('apache/lucenenet')) " Label="Deterministic builds: https://github.com/clairernovotny/DeterministicBuilds#readme (Only valid when building against main GitHub repo)"> + <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
