Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-net9.0-2024-09-04
This commit is contained in:
Коммит
e3950ef9be
|
@ -319,7 +319,7 @@ INCLUDE_TVOS=1
|
|||
INCLUDE_MACCATALYST=1
|
||||
INCLUDE_DEVICE=1
|
||||
INCLUDE_DOTNET_WATCHOS=
|
||||
INCLUDE_XAMARIN_LEGACY=1
|
||||
INCLUDE_XAMARIN_LEGACY=
|
||||
INCLUDE_HOTRESTART=1
|
||||
|
||||
ENABLE_DOTNET=1
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using ObjCRuntime;
|
||||
using Foundation;
|
||||
|
@ -155,8 +156,20 @@ namespace Network {
|
|||
[DllImport (Constants.NetworkLibrary)]
|
||||
static extern unsafe void nw_connection_set_viability_changed_handler (IntPtr handle, void* callback);
|
||||
|
||||
#if !XAMCORE_5_0
|
||||
[Obsolete ("Use 'SetViabilityChangeHandler' instead.")]
|
||||
[EditorBrowsable (EditorBrowsableState.Never)]
|
||||
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||
public unsafe void SetBooleanChangeHandler (Action<bool> callback)
|
||||
{
|
||||
SetViabilityChangeHandler (callback);
|
||||
}
|
||||
#endif // !XAMCORE_5_0
|
||||
|
||||
/// <summary>Set a handler that is called when data can be sent or received.</summary>
|
||||
/// <param name="callback">The callback to call when data can be sent or received.</param>
|
||||
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||
public unsafe void SetViabilityChangeHandler (Action<bool> callback)
|
||||
{
|
||||
if (callback is null) {
|
||||
nw_connection_set_viability_changed_handler (GetCheckedHandle (), null);
|
||||
|
|
|
@ -42193,7 +42193,6 @@ M:Network.NWConnection.Send(System.Byte[],System.Int32,System.Int32,Network.NWCo
|
|||
M:Network.NWConnection.SendIdempotent(CoreFoundation.DispatchData,Network.NWContentContext,System.Boolean)
|
||||
M:Network.NWConnection.SendIdempotent(System.Byte[],Network.NWContentContext,System.Boolean)
|
||||
M:Network.NWConnection.SetBetterPathAvailableHandler(System.Action{System.Boolean})
|
||||
M:Network.NWConnection.SetBooleanChangeHandler(System.Action{System.Boolean})
|
||||
M:Network.NWConnection.SetPathChangedHandler(System.Action{Network.NWPath})
|
||||
M:Network.NWConnection.SetQueue(CoreFoundation.DispatchQueue)
|
||||
M:Network.NWConnection.SetStateChangeHandler(System.Action{Network.NWConnectionState,Network.NWError})
|
||||
|
|
|
@ -72,33 +72,37 @@ ifeq ($(PLATFORM),)
|
|||
PLATFORM=$(shell basename "$(CURDIR)")
|
||||
endif
|
||||
|
||||
ifeq ($(RUNTIMEIDENTIFIERS),)
|
||||
ifneq ($(RUNTIMEIDENTIFIERS)$(RUNTIMEIDENTIFIER),)
|
||||
$(error "Don't set RUNTIMEIDENTIFIER or RUNTIMEIDENTIFIERS, set RID instead")
|
||||
endif
|
||||
|
||||
ifeq ($(RID),)
|
||||
ifeq ($(PLATFORM),iOS)
|
||||
RUNTIMEIDENTIFIERS=ios-arm64
|
||||
RID=ios-arm64
|
||||
else ifeq ($(PLATFORM),tvOS)
|
||||
RUNTIMEIDENTIFIERS=tvos-arm64
|
||||
RID=tvos-arm64
|
||||
else ifeq ($(PLATFORM),MacCatalyst)
|
||||
ifeq ($(CONFIG),Release)
|
||||
RUNTIMEIDENTIFIERS=maccatalyst-x64;maccatalyst-arm64
|
||||
RID=maccatalyst-x64;maccatalyst-arm64
|
||||
else ifneq ($(UNIVERSAL),)
|
||||
RUNTIMEIDENTIFIERS=maccatalyst-x64;maccatalyst-arm64
|
||||
RID=maccatalyst-x64;maccatalyst-arm64
|
||||
else ifeq ($(shell arch),arm64)
|
||||
RUNTIMEIDENTIFIERS=maccatalyst-arm64
|
||||
RID=maccatalyst-arm64
|
||||
else
|
||||
RUNTIMEIDENTIFIERS=maccatalyst-x64
|
||||
RID=maccatalyst-x64
|
||||
endif
|
||||
else ifeq ($(PLATFORM),macOS)
|
||||
ifeq ($(CONFIG),Release)
|
||||
RUNTIMEIDENTIFIERS=osx-x64;osx-arm64
|
||||
RID=osx-x64;osx-arm64
|
||||
else ifneq ($(UNIVERSAL),)
|
||||
RUNTIMEIDENTIFIERS=osx-x64;osx-arm64
|
||||
RID=osx-x64;osx-arm64
|
||||
else ifeq ($(shell arch),arm64)
|
||||
RUNTIMEIDENTIFIERS=osx-arm64
|
||||
RID=osx-arm64
|
||||
else
|
||||
RUNTIMEIDENTIFIERS=osx-x64
|
||||
RID=osx-x64
|
||||
endif
|
||||
else
|
||||
RUNTIMEIDENTIFIERS=unknown-platform-$(PLATFORM)
|
||||
RID=unknown-platform-$(PLATFORM)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -106,10 +110,12 @@ ifneq ($(UNIVERSAL),)
|
|||
UNIVERSAL_ARGUMENT=/p:UniversalBuild=true
|
||||
endif
|
||||
|
||||
ifeq ($(findstring ;,$(RUNTIMEIDENTIFIERS)),;)
|
||||
ifeq ($(findstring ;,$(RID)),;)
|
||||
PATH_RID=
|
||||
export RUNTIMEIDENTIFIERS=$(RID)
|
||||
else
|
||||
PATH_RID=$(RUNTIMEIDENTIFIERS)/
|
||||
PATH_RID=$(RID)/
|
||||
export RUNTIMEIDENTIFIER=$(RID)
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
@ -332,6 +332,35 @@ class BuildConfiguration {
|
|||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Retrieve the change id and export it as an enviroment variable.
|
||||
#>
|
||||
[string] ExportChangeId ([object] $configuration) {
|
||||
# This is an interesting step, we do know we are dealing with a PR, but we need the PR id to
|
||||
# be able to get the labels, the buildSourceBranch follows the pattern: refs/pull/{ChangeId}/merge
|
||||
# we could use a regexp but then we would have two problems instead of one
|
||||
$changeId = $null
|
||||
if ($configuration.PARENT_BUILD_BUILD_SOURCEBRANCH) {
|
||||
# use the source branch information from the configuration object
|
||||
$changeId = $configuration.PARENT_BUILD_BUILD_SOURCEBRANCH.Replace("refs/pull/", "").Replace("/merge", "")
|
||||
} else {
|
||||
Write-Debug "Retrieving change id from the environment since it could not be found in the config."
|
||||
# retrieve the change ide form the BUILD_SOURCEBRANCH enviroment variable.
|
||||
$changeId = "$Env:BUILD_SOURCEBRANCH".Replace("refs/pull/", "").Replace("/merge", "")
|
||||
}
|
||||
|
||||
# we can always fail (regexp error or not env varaible)
|
||||
if ($changeId) {
|
||||
# add a var with the change id, which can be later consumed by some of the old scripts from
|
||||
# jenkins
|
||||
Write-Host "##vso[task.setvariable variable=pr_number;isOutput=true]$changeId"
|
||||
} else {
|
||||
Write-Debug "Not setting the change id because it could not be calculated."
|
||||
}
|
||||
return $changeId
|
||||
}
|
||||
|
||||
[PSCustomObject] Import([string] $configFile) {
|
||||
if (-not (Test-Path -Path $configFile -PathType Leaf)) {
|
||||
throw [System.InvalidOperationException]::new("Configuration file $configFile is missing")
|
||||
|
@ -468,15 +497,9 @@ class BuildConfiguration {
|
|||
|
||||
if ($configuration.BuildReason -eq "PullRequest" -or (($configuration.BuildReason -eq "Manual") -and ($configuration.PARENT_BUILD_BUILD_SOURCEBRANCH -eq "merge")) ) {
|
||||
Write-Host "Configuring build from PR."
|
||||
# This is an interesting step, we do know we are dealing with a PR, but we need the PR id to
|
||||
# be able to get the labels, the buildSourceBranch follows the pattern: refs/pull/{ChangeId}/merge
|
||||
# we could use a regexp but then we would have two problems instead of one
|
||||
$changeId = $configuration.PARENT_BUILD_BUILD_SOURCEBRANCH.Replace("refs/pull/", "").Replace("/merge", "")
|
||||
|
||||
# add a var with the change id, which can be later consumed by some of the old scripts from
|
||||
# jenkins
|
||||
Write-Host "##vso[task.setvariable variable=pr_number;isOutput=true]$changeId"
|
||||
|
||||
# retrieve the PR data to be able to fwd the labels from github
|
||||
$changeId = $this.ExportChangeId($configuration)
|
||||
$prInfo = Get-GitHubPRInfo -ChangeId $changeId
|
||||
Write-Host $prInfo
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче