@@ -35,7 +35,7 @@ Set-StrictMode -Version 2.0
35
35
. $PSScriptRoot \tools.ps1
36
36
37
37
# Add source entry to PackageSources
38
- function AddPackageSource ($sources , $SourceName , $SourceEndPoint , $creds , $Username , $Password ) {
38
+ function AddPackageSource ($sources , $SourceName , $SourceEndPoint , $creds , $Username , $pwd ) {
39
39
$packageSource = $sources.SelectSingleNode (" add[@key='$SourceName ']" )
40
40
41
41
if ($packageSource -eq $null )
@@ -48,12 +48,11 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
48
48
else {
49
49
Write-Host " Package source $SourceName already present."
50
50
}
51
-
52
- AddCredential - Creds $creds - Source $SourceName - Username $Username - Password $Password
51
+ AddCredential - Creds $creds - Source $SourceName - Username $Username - pwd $pwd
53
52
}
54
53
55
54
# Add a credential node for the specified source
56
- function AddCredential ($creds , $source , $username , $password ) {
55
+ function AddCredential ($creds , $source , $username , $pwd ) {
57
56
# Looks for credential configuration for the given SourceName. Create it if none is found.
58
57
$sourceElement = $creds.SelectSingleNode ($Source )
59
58
if ($sourceElement -eq $null )
@@ -82,17 +81,18 @@ function AddCredential($creds, $source, $username, $password) {
82
81
$passwordElement.SetAttribute (" key" , " ClearTextPassword" )
83
82
$sourceElement.AppendChild ($passwordElement ) | Out-Null
84
83
}
85
- $passwordElement.SetAttribute (" value" , $Password )
84
+
85
+ $passwordElement.SetAttribute (" value" , $pwd )
86
86
}
87
87
88
- function InsertMaestroPrivateFeedCredentials ($Sources , $Creds , $Username , $Password ) {
88
+ function InsertMaestroPrivateFeedCredentials ($Sources , $Creds , $Username , $pwd ) {
89
89
$maestroPrivateSources = $Sources.SelectNodes (" add[contains(@key,'darc-int')]" )
90
90
91
91
Write-Host " Inserting credentials for $ ( $maestroPrivateSources.Count ) Maestro's private feeds."
92
92
93
93
ForEach ($PackageSource in $maestroPrivateSources ) {
94
94
Write-Host " `t Inserting credential for Maestro's feed:" $PackageSource.Key
95
- AddCredential - Creds $creds - Source $PackageSource.Key - Username $Username - Password $Password
95
+ AddCredential - Creds $creds - Source $PackageSource.Key - Username $Username - pwd $pwd
96
96
}
97
97
}
98
98
@@ -144,13 +144,13 @@ if ($disabledSources -ne $null) {
144
144
$userName = " dn-bot"
145
145
146
146
# Insert credential nodes for Maestro's private feeds
147
- InsertMaestroPrivateFeedCredentials - Sources $sources - Creds $creds - Username $userName - Password $Password
147
+ InsertMaestroPrivateFeedCredentials - Sources $sources - Creds $creds - Username $userName - pwd $Password
148
148
149
149
# 3.1 uses a different feed url format so it's handled differently here
150
150
$dotnet31Source = $sources.SelectSingleNode (" add[@key='dotnet3.1']" )
151
151
if ($dotnet31Source -ne $null ) {
152
- 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
153
- 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
152
+ AddPackageSource - Sources $sources - SourceName " dotnet3.1-internal" - SourceEndPoint " https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" - Creds $creds - Username $userName - pwd $Password
153
+ 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 - pwd $Password
154
154
}
155
155
156
156
$dotnetVersions = @ (' 5' , ' 6' , ' 7' , ' 8' )
@@ -159,9 +159,9 @@ foreach ($dotnetVersion in $dotnetVersions) {
159
159
$feedPrefix = " dotnet" + $dotnetVersion ;
160
160
$dotnetSource = $sources.SelectSingleNode (" add[@key='$feedPrefix ']" )
161
161
if ($dotnetSource -ne $null ) {
162
- 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
163
- 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
162
+ AddPackageSource - Sources $sources - SourceName " $feedPrefix -internal" - SourceEndPoint " https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix -internal/nuget/v2" - Creds $creds - Username $userName - pwd $Password
163
+ 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 - pwd $Password
164
164
}
165
165
}
166
166
167
- $doc.Save ($filename )
167
+ $doc.Save ($filename )
0 commit comments