Skip to content

Sync Up the Update of Publisher from Main #27829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-powershell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- task: NodeTool@0
displayName: Install Autorest
inputs:
versionSpec: '18.20.7'
versionSpec: '18.20.8'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
- task: NodeTool@0
displayName: Install autorest
inputs:
versionSpec: '14.17.1'
versionSpec: '18.20.8'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/powershell-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- task: NodeTool@0
displayName: Install Autorest
inputs:
versionSpec: '18.20.7'
versionSpec: '18.20.8'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- task: NodeTool@0
displayName: Install autorest
inputs:
versionSpec: '14.17.1'
versionSpec: '18.20.8'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/windows-powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- task: NodeTool@0
displayName: Install Autorest
inputs:
versionSpec: '18.20.7'
versionSpec: '18.20.8'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- task: NodeTool@0
displayName: Install autorest
inputs:
versionSpec: '14.17.1'
versionSpec: '18.20.8'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down
2 changes: 2 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@





8 changes: 3 additions & 5 deletions src/Accounts/Accounts/Az.Accounts.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 5/14/2025
# Generated on: 5/23/2025
#

@{
Expand All @@ -12,7 +12,7 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '5.0.0'
ModuleVersion = '5.0.1'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
Expand Down Expand Up @@ -146,9 +146,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Changed the default output access token of ''Get-AzAccessToken'' from plain text to ''SecureString''.
* Removed the warning message about failing to initialize PSStyle in automation runbooks. [#26155]
* Increased the timeout for tab-completion of location, resource group, etc. to 10 seconds.'
ReleaseNotes = '* Force ''Get-AzAccessToken'' to always return SecureString as long as ''AsSecureString'' is set'

# Prerelease string of this module
# Prerelease = ''
Expand Down
2 changes: 2 additions & 0 deletions src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-->

## Upcoming Release

## Version 5.0.1
* Force `Get-AzAccessToken` to always return SecureString as long as `AsSecureString` is set

## Version 5.0.0
Expand Down
4 changes: 2 additions & 2 deletions src/Accounts/Accounts/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("5.0.0")]
[assembly: AssemblyFileVersion("5.0.0")]
[assembly: AssemblyVersion("5.0.1")]
[assembly: AssemblyFileVersion("5.0.1")]
#if !SIGN
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.Accounts.Test")]
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/Accounts/AssemblyLoading/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.0")]
[assembly: AssemblyFileVersion("5.0.0")]
[assembly: AssemblyVersion("5.0.1")]
[assembly: AssemblyFileVersion("5.0.1")]
4 changes: 2 additions & 2 deletions src/Accounts/Authentication/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.0")]
[assembly: AssemblyFileVersion("5.0.0")]
[assembly: AssemblyVersion("5.0.1")]
[assembly: AssemblyFileVersion("5.0.1")]
#if !SIGN
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Authentication.Test")]
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.0")]
[assembly: AssemblyFileVersion("5.0.0")]
[assembly: AssemblyVersion("5.0.1")]
[assembly: AssemblyFileVersion("5.0.1")]
4 changes: 2 additions & 2 deletions src/Accounts/Authenticators/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.0.0")]
[assembly: AssemblyFileVersion("5.0.0")]
[assembly: AssemblyVersion("5.0.1")]
[assembly: AssemblyFileVersion("5.0.1")]
2 changes: 1 addition & 1 deletion tools/Az/Az.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ DotNetFrameworkVersion = '4.7.2'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.0.0'; },
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.0.1'; },
@{ModuleName = 'Az.Advisor'; RequiredVersion = '2.1.0'; },
@{ModuleName = 'Az.Aks'; RequiredVersion = '7.0.0'; },
@{ModuleName = 'Az.AnalysisServices'; RequiredVersion = '1.2.0'; },
Expand Down
2 changes: 1 addition & 1 deletion tools/AzPreview/AzPreview.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ DotNetFrameworkVersion = '4.7.2'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.0.0'; },
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.0.1'; },
@{ModuleName = 'Az.ADDomainServices'; RequiredVersion = '0.3.0'; },
@{ModuleName = 'Az.Advisor'; RequiredVersion = '2.1.0'; },
@{ModuleName = 'Az.Aks'; RequiredVersion = '7.0.0'; },
Expand Down
2 changes: 1 addition & 1 deletion tools/Docs/az-ps-latest-1.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pac0,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Accounts.5.0.0.zip;sourceType=sa]Az.Accounts,5.0.0
pac0,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Accounts.5.0.1.zip;sourceType=sa]Az.Accounts,5.0.1
pac1,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.ADDomainServices.0.3.0.zip;sourceType=sa]Az.ADDomainServices,0.3.0
pac2,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Advisor.2.1.0.zip;sourceType=sa]Az.Advisor,2.1.0
pac3,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Aks.7.0.0.zip;sourceType=sa]Az.Aks,7.0.0
Expand Down
2 changes: 1 addition & 1 deletion tools/Docs/az-ps-latest-2.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pac0,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Accounts.5.0.0.zip;sourceType=sa]Az.Accounts,5.0.0
pac0,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Accounts.5.0.1.zip;sourceType=sa]Az.Accounts,5.0.1
pac1,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Monitor.6.0.2.zip;sourceType=sa]Az.Monitor,6.0.2
pac2,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.MonitoringSolutions.0.2.0.zip;sourceType=sa]Az.MonitoringSolutions,0.2.0
pac3,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.MySql.1.3.0.zip;sourceType=sa]Az.MySql,1.3.0
Expand Down
53 changes: 30 additions & 23 deletions tools/ModulePublisher.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,36 @@ function Get-RepoLocation

function Get-ApiKey
{
param([string]$repoName)
$vaultKey="PSTestGalleryApiKey"
if ($repoName -eq "PSGallery")
{
$vaultKey = "PowerShellGalleryApiKey"
}
[CmdletBinding()]
param(
[string]$repoName
)

$context = (Get-AzContext -ErrorAction Ignore)
$vaultKey="PSTestGalleryApiKey"
if ($repoName -eq "PSGallery")
{
$vaultKey = "PowerShellGalleryApiKey"
}

if ($context -eq $null -or $context.Account -eq $null -or $context.Account.Id -eq $null)
{
Connect-AzAccount -ErrorAction Stop
}
$context = (Get-AzContext -ErrorAction Ignore)

$secret = Get-AzKeyVaultSecret -VaultName kv-azuresdk -Name $vaultKey -ErrorAction Stop
if ($context -eq $null -or $context.Account -eq $null -or $context.Account.Id -eq $null)
{
Connect-AzAccount -ErrorAction Stop
}

if($secret.SecretValueText -eq $null)
{
$secret = Get-AzKeyVaultSecret -VaultName kv-azuresdk -Name $vaultKey -ErrorAction Stop
$secretPlainText = ConvertFrom-SecureString -SecureString $secret.SecretValue -AsPlainText
$secretPlainText
}
else
{
$secret.SecretValueText
}
$secret = Get-AzKeyVaultSecret -VaultName kv-azuresdk -Name $vaultKey -ErrorAction Stop

if($secret.SecretValueText -eq $null)
{
$secret = Get-AzKeyVaultSecret -VaultName kv-azuresdk -Name $vaultKey -ErrorAction Stop
$secretPlainText = ConvertFrom-SecureString -SecureString $secret.SecretValue -AsPlainText
$secretPlainText
}
else
{
$secret.SecretValueText
}
}

function Update-NugetPackage
Expand Down Expand Up @@ -206,6 +210,7 @@ function Publish-RMModules
$RepoLocation,

[Parameter(ParameterSetName="ByLocation", Mandatory=$true)]
[Parameter(ParameterSetName="ByName", Mandatory=$false)]
[string]
$ApiKey,

Expand All @@ -221,7 +226,9 @@ function Publish-RMModules
if ($PSCmdlet.ParameterSetName -eq "ByName")
{
$RepoLocation = (Get-RepoLocation -repoName $RepoName)
$ApiKey = (Get-ApiKey -repoName $RepoName)
if ($null -eq $ApiKey -Or "" -eq $ApiKey) {
$ApiKey = (Get-ApiKey -repoName $RepoName)
}
}
$modules = (Get-ModuleOrder -directory $Path)
foreach ($package in $modules)
Expand Down
Loading
Loading