Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,16 @@ extends:
matrix:
ARM64:
_RID: osx-arm64
_BuildConfig: Release
_SignType: real
_DotNetPublishToBlobFeed: false
X64:
_RID: osx-x64
_BuildConfig: Release
_SignType: real
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have to specify this anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need on adding it as a variable if it doesn't change in the matrix strategy. Better just adding it directly when calling the script

_DotNetPublishToBlobFeed: false
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh
-sign
--configuration $(_BuildConfig)
--sign
--configuration Release
--prepareMachine
-p:RID=$(_RID) -p:DotNetSignType=real -p:TeamName=$(TeamName) -p:OfficialBuildId=$(Build.BuildNumber)
displayName: Build
Expand All @@ -162,5 +158,4 @@ extends:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop-$(_RID)'
publishLocation: 'Container'
parallel: true

parallel: true
6 changes: 5 additions & 1 deletion src/redist/redist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<ProjectReference Include="..\dotnet-core-uninstall\dotnet-core-uninstall.csproj" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Installers" Version="10.0.0-beta.25124.4"/>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Installers" Version="10.0.0-beta.25124.4" Condition="'$(RID)' == 'win-x86'"/>
</ItemGroup>

<Import Condition="'$(RID)' == 'win-x86'" Project="targets\Versions.targets" />
Expand All @@ -19,4 +19,8 @@
<Import Condition="'$(RID)' == 'win-x86'" Project="targets\FileExtensions.targets" />
<Import Condition="'$(RID)' == 'win-x86'" Project="targets\GenerateMSIs.targets" />
<Target Condition="'$(RID)' == 'win-x86'" Name="GenerateMSIs" AfterTargets="Build" DependsOnTargets="GenerateLayout;GenerateDotnetCoreUninstallMsi" />

<!-- Entitlements are needed but not automatically added for macOS. See https://github.com/dotnet/runtime/issues/113707 -->
<Import Condition="'$(RID)' == 'osx-x64' OR '$(RID)' == 'osx-arm64'" Project="targets\MacEntitlements\AddMacEntitlements.targets" />

</Project>
7 changes: 7 additions & 0 deletions src/redist/targets/MacEntitlements/AddMacEntitlements.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<!-- Entitlements are needed but not automatically added for macOS. See https://github.com/dotnet/runtime/issues/113707 -->
<!-- This generates an ad-hoc signature that will later be resigned, but keeps the entitlements. -->
<Target Name="AddMacEntitlements" AfterTargets="GenerateLayout">
<Exec Command="codesign -s - -f --entitlements $(MSBuildThisFileDirectory)entitlements.plist $(ArtifactsDir)layout/dotnet-core-uninstall/dotnet-core-uninstall" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

akoeplinger's version also had the - by itself, so I'm assuming it's correct, but it looked weird to me. What does this mean exactly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It refers to an empty certificate name. This is an ad-hoc signing, and it will be signed again, so I think it wouldn't make much difference

</Target>
</Project>
16 changes: 16 additions & 0 deletions src/redist/targets/MacEntitlements/entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>