File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
tools/VersionController/Models Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -46,18 +46,21 @@ internal static List<AzurePSVersion> GetAllVersionsFromGallery(string moduleName
4646 {
4747 string repository = System . Environment . GetEnvironmentVariable ( "DEFAULT_PS_REPOSITORY_NAME" ) ;
4848 findModuleScript = @"
49- $secpasswd = ConvertTo-SecureString $Env:DEFAULT_PS_REPOSITORY_PASSWORD -AsPlainText -Force
50- $credential = New-Object System.Management.Automation.PSCredential ($Env:DEFAULT_PS_REPOSITORY_USER , $secpasswd)
51- Find-PSResource -Name " + moduleName + " -Repository " + repository + " -Credential $credential -Prerelease" ;
49+ $AccessTokenSecureString = $env:SYSTEM_ACCESS_TOKEN | ConvertTo-SecureString -AsPlainText -Force;
50+ $credentialsObject = [pscredential]::new('ONEBRANCH_TOKEN' , $AccessTokenSecureString);
51+ Find-PSResource -Name " + moduleName + " -Repository " + repository + " -Credential $credentialsObject -Prerelease" ;
5252 }
5353 else
5454 {
5555 string repository = "PSGallery" ;
5656 findModuleScript = $ "Find-PSResource -Name { moduleName } -Repository { repository } -Prerelease";
5757 }
58+
59+ System . Console . WriteLine ( $ "Find module script: { findModuleScript } ") ;
5860
5961 powershell . AddScript ( findModuleScript ) ;
6062 var cmdletResult = powershell . Invoke ( ) ;
63+ System . Console . WriteLine ( $ "Cmdlet result count: { cmdletResult . Count } ") ;
6164 foreach ( var versionInformation in cmdletResult )
6265 {
6366 System . Console . WriteLine ( versionInformation ) ;
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ public void BumpAllVersions()
8484 {
8585 _newVersion = IsNewModule ( ) ? _oldVersion : GetBumpedVersion ( ) ;
8686 }
87+ Console . WriteLine ( "_assignedVersion: " + _assignedVersion ) ;
8788 if ( MinimalVersion != null && MinimalVersion > new AzurePSVersion ( _newVersion ) )
8889 {
8990 Console . WriteLine ( $ "Adjust version from { _newVersion } to { MinimalVersion } due to MinimalVersion.csv") ;
You can’t perform that action at this time.
0 commit comments