Fix module latest version in pipeline cache (#130)
* Fix module latest version in pipeline cache * Fix positional params
This commit is contained in:
Родитель
a4167d7676
Коммит
8b348720bc
|
@ -11,8 +11,7 @@ runs:
|
|||
run: |
|
||||
$AzOpsModuleVersion = '${{env.AZOPS_MODULE_VERSION}}'
|
||||
if(-not $AzOpsModuleVersion) {
|
||||
$latestVersionUri = "https://www.powershellgallery.com/api/v2/FindPackagesById()?id='AzOps'&`$filter=IsLatestVersion"
|
||||
$latestVersionId = (Invoke-RestMethod $latestVersionUri).properties.NormalizedVersion
|
||||
$latestVersionId = Find-Module -Name AzOps | Select-Object -ExpandProperty Version
|
||||
echo "MODULE_VERSION=$latestVersionId" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -21,8 +21,7 @@ steps:
|
|||
inputs:
|
||||
targetType: "inline"
|
||||
script: |
|
||||
$latestVersionUri = "https://www.powershellgallery.com/api/v2/FindPackagesById()?id='AzOps'&`$filter=IsLatestVersion"
|
||||
$latestVersionId = (Invoke-RestMethod $latestVersionUri).properties.NormalizedVersion
|
||||
$latestVersionId = Find-Module -Name AzOps | Select-Object -ExpandProperty Version
|
||||
Write-Host "##vso[task.setvariable variable=AZOPS_MODULE_VERSION;]$latestVersionId"
|
||||
|
||||
#
|
||||
|
|
Загрузка…
Ссылка в новой задаче