-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathMicrosoft.Build.StandardCI.props
41 lines (35 loc) · 2.43 KB
/
Microsoft.Build.StandardCI.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
<Project>
<!--
Default values for properties initialized from Standard CI environment variables.
See https://github.com/dotnet/sourcelink/tree/master/docs/StandardCI.
Build servers that comply with Standard CI specification set STANDARD_CI_* variables.
Initialize the following properties from their corresponding Standard CI variables:
- SourceRevisionId from STANDARD_CI_SOURCE_REVISION_ID,
- PrivateRepositoryUrl from STANDARD_CI_REPOSITORY_URL,
- RepositoryType from STANDARD_CI_REPOSITORY_TYPE.
-->
<PropertyGroup>
<!--
ContinuousIntegrationBuild is set to true when building on a build server. The variable is used to enable settings that only
apply to official or pull request builds, as opposed to local builds on developer machine.
-->
<ContinuousIntegrationBuild Condition="'$(ContinuousIntegrationBuild)' == '' and '$(DesignTimeBuild)' != 'true' and '$(STANDARD_CI_REPOSITORY_URL)' != ''">true</ContinuousIntegrationBuild>
<!--
SourceRevisionId uniquely identifies the source control revision of the repository the project belongs to.
For Git repositories this id is a commit hash, for TFVC repositories it's the changeset number, etc.
-->
<SourceRevisionId Condition="'$(SourceRevisionId)' == ''">$(STANDARD_CI_SOURCE_REVISION_ID)</SourceRevisionId>
<!--
PrivateRepositoryUrl is the URL of the repository supplied by the CI server or retrieved from source control manager.
Targets consuming this property shall not publish its value implicitly as it might inadvertently reveal an internal URL.
Instead, they shall only do so if the project sets PublishRepositoryUrl property to true. For example, the NuGet Pack target
may include the repository URL in the nuspec file generated for NuGet package produced by the project if PublishRepositoryUrl is true.
-->
<PrivateRepositoryUrl Condition="'$(PrivateRepositoryUrl)' == ''">$(STANDARD_CI_REPOSITORY_URL)</PrivateRepositoryUrl>
<!--
RepositoryType is the name of the source control ('git', 'tfvc', 'svn', 'mercurial', etc.)
-->
<RepositoryType Condition="'$(RepositoryType)' == ''">$(STANDARD_CI_REPOSITORY_TYPE)</RepositoryType>
</PropertyGroup>
</Project>