Skip to content

Commit 690b3dd

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20191203.16 (#3770)
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19603.16
1 parent 40f2fec commit 690b3dd

File tree

4 files changed

+78
-32
lines changed

4 files changed

+78
-32
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272
</Dependency>
7373
</ProductDependencies>
7474
<ToolsetDependencies>
75-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19577.5">
75+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19603.16">
7676
<Uri>https://github.com/dotnet/arcade</Uri>
77-
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha>
77+
<Sha>8e47254f93b276c974968aff83222f89ec3931ed</Sha>
7878
</Dependency>
7979
</ToolsetDependencies>
8080
</Dependencies>

eng/common/SetupNugetSources.ps1

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# condition: eq(variables['Agent.OS'], 'Windows_NT')
1717
# inputs:
1818
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
19-
# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
19+
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
2020
# env:
2121
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
2222

@@ -95,10 +95,15 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
9595
}
9696

9797
if (!(Test-Path $ConfigFile -PathType Leaf)) {
98-
Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
98+
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
9999
ExitWithExitCode 1
100100
}
101101

102+
if (!$Password) {
103+
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
104+
ExitWithExitCode 1
105+
}
106+
102107
# Load NuGet.config
103108
$doc = New-Object System.Xml.XmlDocument
104109
$filename = (Get-Item $ConfigFile).FullName
@@ -121,7 +126,16 @@ if ($creds -eq $null) {
121126
# Insert credential nodes for Maestro's private feeds
122127
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
123128

124-
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
125-
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
129+
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
130+
if ($dotnet3Source -ne $null) {
131+
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
132+
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
133+
}
134+
135+
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
136+
if ($dotnet31Source -ne $null) {
137+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
138+
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 "dn-bot" -Password $Password
139+
}
126140

127-
$doc.Save($filename)
141+
$doc.Save($filename)

eng/common/SetupNugetSources.sh

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# displayName: Setup Private Feeds Credentials
1818
# inputs:
1919
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
20-
# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
20+
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
2121
# condition: ne(variables['Agent.OS'], 'Windows_NT')
2222
# env:
2323
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
@@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
4242
. "$scriptroot/tools.sh"
4343

4444
if [ ! -f "$ConfigFile" ]; then
45-
echo "Couldn't find the file NuGet config file: $ConfigFile"
45+
Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
46+
ExitWithExitCode 1
47+
fi
48+
49+
if [ -z "$CredToken" ]; then
50+
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
4651
ExitWithExitCode 1
4752
fi
4853

@@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then
5257
fi
5358

5459
# Ensure there is a <packageSources>...</packageSources> section.
55-
grep -i "<packageSources>" $ConfigFile
60+
grep -i "<packageSources>" $ConfigFile
5661
if [ "$?" != "0" ]; then
5762
echo "Adding <packageSources>...</packageSources> section."
5863
ConfigNodeHeader="<configuration>"
@@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then
6267
fi
6368

6469
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
65-
grep -i "<packageSourceCredentials>" $ConfigFile
70+
grep -i "<packageSourceCredentials>" $ConfigFile
6671
if [ "$?" != "0" ]; then
6772
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
6873

@@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then
7277
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
7378
fi
7479

75-
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
76-
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
77-
if [ "$?" != "0" ]; then
78-
echo "Adding dotnet3-internal to the packageSources."
80+
PackageSources=()
7981

80-
PackageSourcesNodeFooter="</packageSources>"
81-
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
82+
# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
83+
grep -i "<add key=\"dotnet3\"" $ConfigFile
84+
85+
if [ "$?" == "0" ]; then
86+
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
87+
if [ "$?" != "0" ]; then
88+
echo "Adding dotnet3-internal to the packageSources."
89+
PackageSourcesNodeFooter="</packageSources>"
90+
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
91+
92+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
93+
fi
94+
PackageSources+=('dotnet3-internal')
95+
96+
grep -i "<add key=\"dotnet3-internal-transport\"" $ConfigFile
97+
if [ "$?" != "0" ]; then
98+
echo "Adding dotnet3-internal-transport to the packageSources."
99+
PackageSourcesNodeFooter="</packageSources>"
100+
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
82101

83-
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
102+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
103+
fi
104+
PackageSources+=('dotnet3-internal-transport')
84105
fi
85106

86-
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
87-
grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile
88-
if [ "$?" != "0" ]; then
89-
echo "Adding dotnet3-internal-transport to the packageSources."
107+
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
108+
grep -i "<add key=\"dotnet3.1\"" $ConfigFile
109+
if [ "$?" == "0" ]; then
110+
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
111+
if [ "$?" != "0" ]; then
112+
echo "Adding dotnet3.1-internal to the packageSources."
113+
PackageSourcesNodeFooter="</packageSources>"
114+
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
90115

91-
PackageSourcesNodeFooter="</packageSources>"
92-
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
116+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
117+
fi
118+
PackageSources+=('dotnet3.1-internal')
93119

94-
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
120+
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
121+
if [ "$?" != "0" ]; then
122+
echo "Adding dotnet3.1-internal-transport to the packageSources."
123+
PackageSourcesNodeFooter="</packageSources>"
124+
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
125+
126+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
127+
fi
128+
PackageSources+=('dotnet3.1-internal-transport')
95129
fi
96130

97131
# I want things split line by line
98132
PrevIFS=$IFS
99133
IFS=$'\n'
100-
PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
134+
PackageSources+="$IFS"
135+
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
101136
IFS=$PrevIFS
102137

103-
PackageSources+=('dotnet3-internal')
104-
PackageSources+=('dotnet3-internal-transport')
105-
106138
for FeedName in ${PackageSources[@]} ; do
107139
# Check if there is no existing credential for this FeedName
108140
grep -i "<$FeedName>" $ConfigFile
@@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do
112144
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
113145
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
114146

115-
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
147+
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
116148
fi
117-
done
149+
done

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
}
99
},
1010
"msbuild-sdks": {
11-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19577.5"
11+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19603.16"
1212
}
1313
}

0 commit comments

Comments
 (0)