Skip to content

Commit

Permalink
Merge pull request #1554 from microsoft/dev/dagood/single-feed-1.24
Browse files Browse the repository at this point in the history
[microsoft/release-branch.go1.24] Port Release Studio single feed fixes
  • Loading branch information
dagood authored Feb 12, 2025
2 parents c7d86f2 + 785d130 commit c74dff8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
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
7 changes: 1 addition & 6 deletions eng/release-studio/NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
<configuration>
<packageSources>
<clear />
<!-- Only one feed is allowed. https://aka.ms/cfs/nuget -->
<add key="MicroBuildToolset" value="https://pkgs.dev.azure.com/dnceng/_packaging/MicroBuildToolset/nuget/v3/index.json" />
<!--
When the .NET SDK version doesn't match the TargetFramework, get targeting
packs (Microsoft.NETCore.App.Ref, Microsoft.WindowsDesktop.App.Ref, and
Microsoft.AspNetCore.App.Ref) from here.
-->
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down
29 changes: 28 additions & 1 deletion eng/release-studio/ReleaseStudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,38 @@

<!-- Minimal info for '.csproj' to work. -->
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<!--
We only have a single NuGet feed, and that feed doesn't have any targeting
packs (Microsoft.NETCore.App.Ref, Microsoft.WindowsDesktop.App.Ref, and
Microsoft.AspNetCore.App.Ref). To avoid downloading any targeting packs,
we need the Target Framework to match the .NET SDK exactly. The SDK may be
upgraded without our knowledge, so a hard-coded version is fragile. Use
BundledNETCoreAppTargetFrameworkVersion to be flexible.
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>
1 change: 1 addition & 0 deletions eng/signing/NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<configuration>
<packageSources>
<clear />
<!-- Multiple feeds are allowed, but only because they are both in dnceng/public. -->
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
</packageSources>
Expand Down

0 comments on commit c74dff8

Please sign in to comment.