Skip to content

Commit 0ea21d9

Browse files
Fix MinVer and SourceLink detection
1 parent 41fff7b commit 0ea21d9

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

msbuild/props/SixLabors.Global.props

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@
1010
that is done by the file that imports us.
1111
-->
1212

13-
<!-- Define Environmental conditionals -->
14-
<!-- Determined by environmental settings set in build-and-test.yml-->
13+
<!--
14+
Define Environmental conditionals. Determined by environmental settings set in build-and-test.yml
15+
These proeprties are defined 2X to ensure both MSBuild and Visual Studio (preprocessor directives)
16+
can correctly detect them.
17+
-->
1518
<PropertyGroup>
1619
<IsContinuousIntegration Condition="'$(CI)' == 'true'">true</IsContinuousIntegration>
1720
<IsCodeCoverage Condition="'$(codecov)' == 'true'">true</IsCodeCoverage>
1821
</PropertyGroup>
22+
1923
<PropertyGroup Condition="'$(IsContinuousIntegration)'=='true'">
2024
<DefineConstants>$(DefineConstants);ENV_CI</DefineConstants>
2125
</PropertyGroup>

msbuild/props/SixLabors.Src.props

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@
2121
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2222
</PropertyGroup>
2323

24+
<!--
25+
Define Environmental conditionals. Determined by environmental settings set in build-and-test.yml
26+
These proeprties are defined 2X to ensure both MSBuild and Visual Studio (preprocessor directives)
27+
can correctly detect them.
28+
-->
29+
<PropertyGroup>
30+
<IsContinuousIntegration Condition="'$(CI)' == 'true'">true</IsContinuousIntegration>
31+
<IsCodeCoverage Condition="'$(codecov)' == 'true'">true</IsCodeCoverage>
32+
</PropertyGroup>
33+
2434
<!-- Deterministic settings. CI only .-->
2535
<PropertyGroup Condition="'$(IsContinuousIntegration)'=='true'">
2636
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
@@ -30,16 +40,16 @@
3040
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3141
</PropertyGroup>
3242

33-
<!-- Package references and additional files which are consumed by src projects. CI Only -->
34-
<ItemGroup Condition="'$(IsContinuousIntegration)'=='true'">
35-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" IsImplicitlyDefined="true" />
36-
<PackageReference Include="MinVer" PrivateAssets="All" Version="2.3.1" IsImplicitlyDefined="true"/>
37-
</ItemGroup>
38-
3943
<!--MinVer Properties for versioning. CI only-->
4044
<PropertyGroup Condition="'$(IsContinuousIntegration)'=='true'">
4145
<MinVerTagPrefix>v</MinVerTagPrefix>
4246
<MinVerVerbosity>normal</MinVerVerbosity>
4347
</PropertyGroup>
4448

49+
<!-- Package references and additional files which are consumed by src projects. CI Only -->
50+
<ItemGroup Condition="'$(IsContinuousIntegration)'=='true'">
51+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" IsImplicitlyDefined="true" />
52+
<PackageReference Include="MinVer" PrivateAssets="All" Version="2.3.1" IsImplicitlyDefined="true"/>
53+
</ItemGroup>
54+
4555
</Project>

0 commit comments

Comments
 (0)