Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rel/17.2] Update Newtonsoft.Json to 13.0.1 (#4310 #4310

Merged
merged 7 commits into from
Feb 22, 2023
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
16 changes: 11 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Pipeline YAML for PR
trigger:
- main
- rel/*

pr:
- main
- rel/*

jobs:
- job: Windows
Expand All @@ -15,7 +21,7 @@ jobs:
displayName: 'Run script build.cmd'
inputs:
filename: build.cmd
arguments: '-verbose -configuration $(buildConfiguration) -ci -steps "InstallDotnet, Restore, UpdateLocalization, Build, Publish"'
arguments: '-verbose -configuration $(buildConfiguration) -ci -steps "InstallDotnet, Restore, UpdateLocalization, Build, Publish, Pack, Manifest"'
modifyEnvironment: false
failOnStandardError: true

Expand Down Expand Up @@ -168,8 +174,8 @@ jobs:
Ubuntu_18_04:
vmImage: ubuntu-18.04
pwsh: true
macOS_10_15_Catalina:
vmImage: macOS-10.15
macOS_11:
vmImage: macOS-11
pwsh: true
pool:
vmImage: $[ variables['vmImage'] ]
Expand Down Expand Up @@ -215,5 +221,5 @@ jobs:
parameters:
platform:
name: Managed
container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343
container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7
buildScript: eng/common/build.sh
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<!-- This repo version -->
<VersionPrefix>17.2.0</VersionPrefix>
<VersionPrefix>17.2.1</VersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<!-- Opt-out repo features -->
<UsingToolXliff>false</UsingToolXliff>
Expand Down Expand Up @@ -38,7 +38,7 @@
<MoqVersion>4.16.1</MoqVersion>
<MonoOptionsVersion>5.3.0.1</MonoOptionsVersion>
<McMasterExtensionsCommandLineUtils>2.3.0</McMasterExtensionsCommandLineUtils>
<NewtonsoftJsonVersion>9.0.1</NewtonsoftJsonVersion>
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
<MicrosoftBclJsonSourcesVersion>4.6.0-preview4.19202.2</MicrosoftBclJsonSourcesVersion>
<NuGetVersioningVersion>4.4.0</NuGetVersioningVersion>
<NuGetVersion>5.3.0</NuGetVersion>
Expand Down
4 changes: 4 additions & 0 deletions eng/common/BuildConfiguration/build-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RetryCountLimit": 1,
"RetryByAnyError": false
}
18 changes: 9 additions & 9 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,22 @@ $userName = "dn-bot"
# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password

# 3.1 uses a different feed url format so it's handled differently here
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}

$dotnet5Source = $sources.SelectSingleNode("add[@key='dotnet5']")
if ($dotnet5Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet5-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
$dotnetVersions = @('5','6','7')

$dotnet6Source = $sources.SelectSingleNode("add[@key='dotnet6']")
if ($dotnet6Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet6-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet6-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
if ($dotnetSource -ne $null) {
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
}

$doc.Save($filename)
68 changes: 24 additions & 44 deletions eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,53 +105,33 @@ if [ "$?" == "0" ]; then
PackageSources+=('dotnet3.1-internal-transport')
fi

# Ensure dotnet5-internal and dotnet5-internal-transport are in the packageSources if the public dotnet5 feeds are present
grep -i "<add key=\"dotnet5\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet5-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet5-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet5-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet5-internal')

grep -i "<add key=\"dotnet5-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet5-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet5-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet5-internal-transport')
fi

# Ensure dotnet6-internal and dotnet6-internal-transport are in the packageSources if the public dotnet6 feeds are present
grep -i "<add key=\"dotnet6\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet6-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet6-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2\" />"
DotNetVersions=('5' '6' '7')

for DotNetVersion in ${DotNetVersions[@]} ; do
FeedPrefix="dotnet${DotNetVersion}";
grep -i "<add key=\"$FeedPrefix\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"$FeedPrefix-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding $FeedPrefix-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"$FeedPrefix-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=("$FeedPrefix-internal")

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet6-internal')
grep -i "<add key=\"$FeedPrefix-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding $FeedPrefix-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"$FeedPrefix-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal-transport/nuget/v2\" />"

grep -i "<add key=\"dotnet6-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet6-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=("$FeedPrefix-internal-transport")
fi
PackageSources+=('dotnet6-internal-transport')
fi
done

# I want things split line by line
PrevIFS=$IFS
Expand Down
5 changes: 5 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Param(
[string] $runtimeSourceFeed = '',
[string] $runtimeSourceFeedKey = '',
[switch] $excludePrereleaseVS,
[switch] $nativeToolsOnMachine,
[switch] $help,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
Expand Down Expand Up @@ -67,6 +68,7 @@ function Print-Usage() {
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Write-Host ""

Write-Host "Command line arguments not listed above are passed thru to msbuild."
Expand Down Expand Up @@ -146,6 +148,9 @@ try {
$nodeReuse = $false
}

if ($nativeToolsOnMachine) {
$env:NativeToolsOnMachine = $true
}
if ($restore) {
InitializeNativeTools
}
Expand Down
17 changes: 16 additions & 1 deletion eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ usage()
echo "Actions:"
echo " --restore Restore dependencies (short: -r)"
echo " --build Build solution (short: -b)"
echo " --sourceBuild Source-build the solution (short: -sb)"
echo " Will additionally trigger the following actions: --restore, --build, --pack"
echo " If --configuration is not set explicitly, will also set it to 'Release'"
echo " --rebuild Rebuild solution"
echo " --test Run all unit tests in the solution (short: -t)"
echo " --integrationTest Run all integration tests in the solution"
Expand Down Expand Up @@ -55,6 +58,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

restore=false
build=false
source_build=false
rebuild=false
test=false
integration_test=false
Expand All @@ -73,7 +77,7 @@ exclude_ci_binary_log=false
pipelines_log=false

projects=''
configuration='Debug'
configuration=''
prepare_machine=false
verbosity='minimal'
runtime_source_feed=''
Expand Down Expand Up @@ -119,6 +123,12 @@ while [[ $# > 0 ]]; do
-pack)
pack=true
;;
-sourcebuild|-sb)
build=true
source_build=true
restore=true
pack=true
;;
-test|-t)
test=true
;;
Expand Down Expand Up @@ -168,6 +178,10 @@ while [[ $# > 0 ]]; do
shift
done

if [[ -z "$configuration" ]]; then
if [[ "$source_build" = true ]]; then configuration="Release"; else configuration="Debug"; fi
fi

if [[ "$ci" == true ]]; then
pipelines_log=true
node_reuse=false
Expand Down Expand Up @@ -205,6 +219,7 @@ function Build {
/p:RepoRoot="$repo_root" \
/p:Restore=$restore \
/p:Build=$build \
/p:ArcadeBuildFromSource=$source_build \
/p:Rebuild=$rebuild \
/p:Test=$test \
/p:Pack=$pack \
Expand Down
11 changes: 11 additions & 0 deletions eng/common/cross/arm/sources.list.focal
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted

deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
11 changes: 11 additions & 0 deletions eng/common/cross/arm/sources.list.jammy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted

deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
11 changes: 11 additions & 0 deletions eng/common/cross/arm64/sources.list.focal
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted

deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
11 changes: 11 additions & 0 deletions eng/common/cross/arm64/sources.list.jammy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe

deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted

deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
4 changes: 2 additions & 2 deletions eng/common/cross/build-android-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ __AndroidPackages+=" liblzma"
__AndroidPackages+=" krb5"
__AndroidPackages+=" openssl"

for path in $(wget -qO- http://termux.net/dists/stable/main/binary-$__AndroidArch/Packages |\
for path in $(wget -qO- https://packages.termux.dev/termux-main-21/dists/stable/main/binary-$__AndroidArch/Packages |\
grep -A15 "Package: \(${__AndroidPackages// /\\|}\)" | grep -v "static\|tool" | grep Filename); do

if [[ "$path" != "Filename:" ]]; then
echo "Working on: $path"
wget -qO- http://termux.net/$path | dpkg -x - "$__TmpDir"
wget -qO- https://packages.termux.dev/termux-main-21/$path | dpkg -x - "$__TmpDir"
fi
done

Expand Down
Loading