@@ -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 )
@@ -49,11 +49,11 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
49
49
Write-Host " Package source $SourceName already present."
50
50
}
51
51
52
- AddCredential - Creds $creds - Source $SourceName - Username $Username - Password $Password
52
+ AddCredential - Creds $creds - Source $SourceName - Username $Username - Password $pwd
53
53
}
54
54
55
55
# Add a credential node for the specified source
56
- function AddCredential ($creds , $source , $username , $password ) {
56
+ function AddCredential ($creds , $source , $username , $pwd ) {
57
57
# Looks for credential configuration for the given SourceName. Create it if none is found.
58
58
$sourceElement = $creds.SelectSingleNode ($Source )
59
59
if ($sourceElement -eq $null )
@@ -82,17 +82,17 @@ function AddCredential($creds, $source, $username, $password) {
82
82
$passwordElement.SetAttribute (" key" , " ClearTextPassword" )
83
83
$sourceElement.AppendChild ($passwordElement ) | Out-Null
84
84
}
85
- $passwordElement.SetAttribute (" value" , $Password )
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,24 +144,24 @@ 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
$dotnet31Source = $sources.SelectSingleNode (" add[@key='dotnet3.1']" )
150
150
if ($dotnet31Source -ne $null ) {
151
- 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
152
- 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
151
+ 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
152
+ 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
153
153
}
154
154
155
155
$dotnet5Source = $sources.SelectSingleNode (" add[@key='dotnet5']" )
156
156
if ($dotnet5Source -ne $null ) {
157
- 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
158
- 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
157
+ AddPackageSource - Sources $sources - SourceName " dotnet5-internal" - SourceEndPoint " https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2" - Creds $creds - Username $userName - pwd $Password
158
+ 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 - pwd $Password
159
159
}
160
160
161
161
$dotnet6Source = $sources.SelectSingleNode (" add[@key='dotnet6']" )
162
162
if ($dotnet6Source -ne $null ) {
163
- 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
164
- 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
163
+ AddPackageSource - Sources $sources - SourceName " dotnet6-internal" - SourceEndPoint " https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2" - Creds $creds - Username $userName - pwd $Password
164
+ 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 - pwd $Password
165
165
}
166
166
167
167
$doc.Save ($filename )
0 commit comments