Skip to content

Commit

Permalink
Fix Release Studio script gathering: stable target dir (#1550)
Browse files Browse the repository at this point in the history
(cherry picked from commit 43e5ee4)
  • Loading branch information
dagood committed Feb 12, 2025
1 parent 1323882 commit b8a310d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eng/pipeline/stages/public-publish-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ stages:
- name: GoBinariesDir
value: $(Pipeline.Workspace)/Binaries Signed
- name: NetCorePublishingScripts
value: $(Build.SourcesDirectory)/eng/release-studio/bin/Debug/net7.0/MsGoPublishingScripts
value: $(Build.SourcesDirectory)/eng/release-studio/bin/MsGoPublishingScripts

# This is read directly by release studio scripts through env.
- name: RMExecutionEnvironment
Expand All @@ -70,6 +70,7 @@ stages:
projects: '$(Build.SourcesDirectory)/eng/release-studio/ReleaseStudio.csproj'
custom: build
arguments: >-
/p:NetCorePublishingScripts=$(NetCorePublishingScripts)
/bl:eng/release-studio/Build.binlog
/v:n
Expand Down
17 changes: 17 additions & 0 deletions eng/release-studio/ReleaseStudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,27 @@
We aren't actually building an app anyway, we just need the RM package.
-->
<TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFramework>

<!-- Default value for simple local repro. -->
<MsGoPublishingScripts>$(MSBuildThisFileDirectory)bin\MsGoPublishingScripts</MsGoPublishingScripts>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DevDiv.RM.MS.Go.Publishing" Version="20240703.4.0" />
</ItemGroup>

<!--
The scripts end up in a dir with Debug/Release and TargetFramework in the
path, which we don't want to rely on. So, copy them to a known place too.
Use the ScriptFilesToCopy items gathered by MsGoPublishingScriptsCopy.
-->
<Target
Name="CopyPublishingScriptsToStableLocation"
AfterTargets="MsGoPublishingScriptsCopy">

<Copy
SourceFiles="@(ScriptFilesToCopy)"
DestinationFolder="$([MSBuild]::NormalizeDirectory('$(MsGoPublishingScripts)', '%(RecursiveDir)'))" />
</Target>

</Project>

0 comments on commit b8a310d

Please sign in to comment.