Skip to content

Commit 36b15db

Browse files
Deduplidate assets in VMR builds (#4960)
* Deduplidate assets in VMR builds * Update Publishing.props Co-authored-by: Viktor Hofer <[email protected]> --------- Co-authored-by: Viktor Hofer <[email protected]>
1 parent 5989cb9 commit 36b15db

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

eng/Publishing.props

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88
<PlatformName Condition="'$(TargetArchitecture)' != ''">$(TargetArchitecture)</PlatformName>
99
</PropertyGroup>
1010

11+
<!--
12+
Only generate the productVersion.txt and windowsdesktop-productVersion.txt files when we're building
13+
either the full VMR repo or not building in the VMR infrastructure.
14+
This ensures that we don't produce these files in the "Repo source build" builds,
15+
but we do produce them in both the VMR and the runtime official build.
16+
-->
17+
<PropertyGroup>
18+
<ShouldGenerateProductVersionFiles Condition="'$(DotNetBuildOrchestrator)' == 'true' and '$(EnableDefaultRidSpecificArtifacts)' != 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1')">true</ShouldGenerateProductVersionFiles>
19+
<ShouldGenerateProductVersionFiles Condition="'$(DotNetBuildOrchestrator)' != 'true' and '$(EnableDefaultArtifacts)' == 'true'">true</ShouldGenerateProductVersionFiles>
20+
</PropertyGroup>
21+
1122
<Target Name="GetNonStableProductVersion">
1223
<!-- Retrieve the non-stable runtime pack product version.
1324
Don't stabilize the package version in order to retrieve the VersionSuffix. -->
@@ -22,7 +33,7 @@
2233
<Target Name="GenerateProductVersionFiles"
2334
DependsOnTargets="GetNonStableProductVersion"
2435
BeforeTargets="PublishToAzureDevOpsArtifacts"
25-
Condition="'$(EnableDefaultArtifacts)' == 'true'">
36+
Condition="'$(ShouldGenerateProductVersionFiles)' == 'true'">
2637
<!-- Retrieve the runtime pack version -->
2738
<MSBuild Projects="$(RepoRoot)src/windowsdesktop/src/sfx/Microsoft.WindowsDesktop.App.Runtime.sfxproj"
2839
Targets="ReturnProductVersion">

0 commit comments

Comments
 (0)