@@ -35,7 +35,7 @@ Set-StrictMode -Version 2.0
3535. $PSScriptRoot \tools.ps1
3636
3737# Add source entry to PackageSources
38- function AddPackageSource ($sources , $SourceName , $SourceEndPoint , $creds , $Username , $Password ) {
38+ function AddPackageSource ($sources , $SourceName , $SourceEndPoint , $creds , $Username , $pwd ) {
3939 $packageSource = $sources.SelectSingleNode (" add[@key='$SourceName ']" )
4040
4141 if ($packageSource -eq $null )
@@ -49,11 +49,11 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
4949 Write-Host " Package source $SourceName already present."
5050 }
5151
52- AddCredential - Creds $creds - Source $SourceName - Username $Username - Password $Password
52+ AddCredential - Creds $creds - Source $SourceName - Username $Username - Password $pwd
5353}
5454
5555# Add a credential node for the specified source
56- function AddCredential ($creds , $source , $username , $password ) {
56+ function AddCredential ($creds , $source , $username , $pwd ) {
5757 # Looks for credential configuration for the given SourceName. Create it if none is found.
5858 $sourceElement = $creds.SelectSingleNode ($Source )
5959 if ($sourceElement -eq $null )
@@ -82,17 +82,17 @@ function AddCredential($creds, $source, $username, $password) {
8282 $passwordElement.SetAttribute (" key" , " ClearTextPassword" )
8383 $sourceElement.AppendChild ($passwordElement ) | Out-Null
8484 }
85- $passwordElement.SetAttribute (" value" , $Password )
85+ $passwordElement.SetAttribute (" value" , $pwd )
8686}
8787
88- function InsertMaestroPrivateFeedCredentials ($Sources , $Creds , $Username , $Password ) {
88+ function InsertMaestroPrivateFeedCredentials ($Sources , $Creds , $Username , $pwd ) {
8989 $maestroPrivateSources = $Sources.SelectNodes (" add[contains(@key,'darc-int')]" )
9090
9191 Write-Host " Inserting credentials for $ ( $maestroPrivateSources.Count ) Maestro's private feeds."
9292
9393 ForEach ($PackageSource in $maestroPrivateSources ) {
9494 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
9696 }
9797}
9898
@@ -144,24 +144,24 @@ if ($disabledSources -ne $null) {
144144$userName = " dn-bot"
145145
146146# 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
148148
149149$dotnet31Source = $sources.SelectSingleNode (" add[@key='dotnet3.1']" )
150150if ($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
153153}
154154
155155$dotnet5Source = $sources.SelectSingleNode (" add[@key='dotnet5']" )
156156if ($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
159159}
160160
161161$dotnet6Source = $sources.SelectSingleNode (" add[@key='dotnet6']" )
162162if ($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
165165}
166166
167167$doc.Save ($filename )
0 commit comments