Skip to content

Commit

Permalink
Shorten up the DotNet.ReproducibleBuilds package props file. (#11)
Browse files Browse the repository at this point in the history
This should make it easier to edit it in the future as well.

Fixes #12.

---------

Co-authored-by: Matt Kotsenas <matt.kotsenas@gmail.com>
  • Loading branch information
AraHaan and MattKotsenas authored Aug 30, 2024
1 parent 4336d59 commit 94faeb1
Showing 1 changed file with 24 additions and 74 deletions.
98 changes: 24 additions & 74 deletions src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,82 +9,32 @@
<ItemGroup>
<SourceLinkGitLabHost Include="gitlab.com" />
</ItemGroup>

<!-- Enable ContinuousIntegrationBuild when running on CI -->

<!-- Azure Pipelines / DevOpsServer
https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#system-variables-devops-services
-->
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- GitHub Actions
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
-->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- AppVeyor
https://www.appveyor.com/docs/environment-variables/
-->
<PropertyGroup Condition="'$(APPVEYOR)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- Set by many build agents -->
<PropertyGroup Condition="'$(CI)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- Travis CI
https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
-->
<PropertyGroup Condition="'$(TRAVIS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- Circle CI
https://circleci.com/docs/variables/#built-in-environment-variables
-->
<PropertyGroup Condition="'$(CIRCLECI)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- AWS CodeBuild
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html
-->
<PropertyGroup Condition="'$(CODEBUILD_BUILD_ID)' != '' and '$(AWS_REGION)' != '' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- Jenkins
https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
-->
<PropertyGroup Condition="'$(BUILD_ID)' != '' and '$(BUILD_URL)' != '' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- Google Cloud Build
https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values
-->
<PropertyGroup Condition="'$(BUILD_ID)' != '' and '$(PROJECT_ID)' != '' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- TeamCity
https://www.jetbrains.com/help/teamcity/predefined-build-parameters.html#Server+Build+Properties
-->
<PropertyGroup Condition="'$(TEAMCITY_VERSION)' != '' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<!-- Enable ContinuousIntegrationBuild when running on CI -->

<!-- JetBrains Space
https://www.jetbrains.com/help/space/automation-environment-variables.html#general
-->
<PropertyGroup Condition="'$(JB_SPACE_API_URL)' != '' ">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<PropertyGroup>
<!-- Set by many build agents -->
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
<!-- Azure Pipelines / DevOpsServer https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#system-variables-devops-services -->
<ContinuousIntegrationBuild Condition="'$(TF_BUILD)' == 'true' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- GitHub Actions https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables -->
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- AppVeyor https://www.appveyor.com/docs/environment-variables/ -->
<ContinuousIntegrationBuild Condition="'$(APPVEYOR)' == 'true' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- Travis CI https://docs.travis-ci.com/user/environment-variables/#default-environment-variables -->
<ContinuousIntegrationBuild Condition="'$(TRAVIS)' == 'true' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- Circle CI https://circleci.com/docs/variables/#built-in-environment-variables -->
<ContinuousIntegrationBuild Condition="'$(CIRCLECI)' == 'true' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- AWS CodeBuild https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html -->
<ContinuousIntegrationBuild Condition="'$(CODEBUILD_BUILD_ID)' != '' AND '$(AWS_REGION)' != '' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- Jenkins https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables -->
<ContinuousIntegrationBuild Condition="'$(BUILD_ID)' != '' AND '$(BUILD_URL)' != '' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- Google Cloud Build https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values -->
<ContinuousIntegrationBuild Condition="'$(BUILD_ID)' != '' AND '$(PROJECT_ID)' != '' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- TeamCity https://www.jetbrains.com/help/teamcity/predefined-build-parameters.html#Server+Build+Properties -->
<ContinuousIntegrationBuild Condition="'$(TEAMCITY_VERSION)' != '' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
<!-- JetBrains Space https://www.jetbrains.com/help/space/automation-environment-variables.html#general -->
<ContinuousIntegrationBuild Condition="'$(JB_SPACE_API_URL)' != '' AND '$(ContinuousIntegrationBuild)' != 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>

</Project>

0 comments on commit 94faeb1

Please sign in to comment.