File tree 2 files changed +7
-3
lines changed
tools/VersionController/Models
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
46
46
{
47
47
string repository = System . Environment . GetEnvironmentVariable ( "DEFAULT_PS_REPOSITORY_NAME" ) ;
48
48
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" ;
52
52
}
53
53
else
54
54
{
55
55
string repository = "PSGallery" ;
56
56
findModuleScript = $ "Find-PSResource -Name { moduleName } -Repository { repository } -Prerelease";
57
57
}
58
+
59
+ System . Console . WriteLine ( $ "Find module script: { findModuleScript } ") ;
58
60
59
61
powershell . AddScript ( findModuleScript ) ;
60
62
var cmdletResult = powershell . Invoke ( ) ;
63
+ System . Console . WriteLine ( $ "Cmdlet result count: { cmdletResult . Count } ") ;
61
64
foreach ( var versionInformation in cmdletResult )
62
65
{
63
66
System . Console . WriteLine ( versionInformation ) ;
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ public void BumpAllVersions()
84
84
{
85
85
_newVersion = IsNewModule ( ) ? _oldVersion : GetBumpedVersion ( ) ;
86
86
}
87
+ Console . WriteLine ( "_assignedVersion: " + _assignedVersion ) ;
87
88
if ( MinimalVersion != null && MinimalVersion > new AzurePSVersion ( _newVersion ) )
88
89
{
89
90
Console . WriteLine ( $ "Adjust version from { _newVersion } to { MinimalVersion } due to MinimalVersion.csv") ;
You can’t perform that action at this time.
0 commit comments