Skip to content
Merged
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
16 changes: 10 additions & 6 deletions eng/templates/official/release/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,18 @@ jobs:

# Change version file.
$versionFilePath = "${{ parameters.versionFilePath }}"
$versionPattern = '${{ parameters.versionPattern }}'
$versionReplacement = '${{ parameters.versionReplacement }}' -replace '\{\{VERSION\}\}', $newLibraryVersion
$versionPattern = $env:VERSION_PATTERN
$versionReplacementTemplate = $env:VERSION_REPLACEMENT
$versionReplacement = $versionReplacementTemplate -replace '\{\{VERSION\}\}', $newLibraryVersion

Write-Host "Change version number in $versionFilePath to $newLibraryVersion"
((Get-Content $versionFilePath) -replace $versionPattern, $versionReplacement -join "`n") + "`n" | Set-Content -NoNewline $versionFilePath
git add $versionFilePath

# Update pyproject metadata when parameters are provided.
$pyprojectPath = "${{ parameters.pyprojectPath }}"
$pythonVersionRequirement = "${{ parameters.pythonVersionRequirement }}"
$pythonClassifiers = @"
${{ parameters.pythonClassifiers }}
"@
$pythonVersionRequirement = $env:PYTHON_VERSION_REQUIREMENT
$pythonClassifiers = $env:PYTHON_CLASSIFIERS

if (![string]::IsNullOrWhiteSpace($pyprojectPath) -and (Test-Path $pyprojectPath)) {
$content = Get-Content $pyprojectPath -Raw
Expand Down Expand Up @@ -161,6 +160,11 @@ jobs:
}
}
displayName: 'Push ${{ parameters.releaseBranchPrefix }}/x.y.z'
env:
VERSION_PATTERN: ${{ parameters.versionPattern }}
VERSION_REPLACEMENT: ${{ parameters.versionReplacement }}
PYTHON_VERSION_REQUIREMENT: ${{ parameters.pythonVersionRequirement }}
PYTHON_CLASSIFIERS: ${{ parameters.pythonClassifiers }}

- job: "CheckReleaseBranch"
dependsOn: ['CreateReleaseBranch']
Expand Down
8 changes: 4 additions & 4 deletions eng/templates/official/release/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
}

# Locate and validate assets before creating the release.
$distFolder = Join-Path '$(Pipeline.Workspace)' (Join-Path '${{ parameters.artifactName }}' 'dist')
$distFolder = Join-Path '$(Pipeline.Workspace)' (Join-Path "${{ parameters.artifactName }}" 'dist')
if (-not (Test-Path -LiteralPath $distFolder)) {
throw "Distribution folder not found: $distFolder"
}
Expand Down Expand Up @@ -206,8 +206,8 @@ jobs:
azurePowerShellVersion: LatestVersion
pwsh: true
Inline: |
$version = '${{ parameters.libraryVersion }}'
$blobPath = '${{ parameters.blobPath }}'
$version = "${{ parameters.libraryVersion }}"
$blobPath = "${{ parameters.blobPath }}"
$distFolder = '$(Pipeline.Workspace)/${{ parameters.artifactName }}/dist'

Write-Host "Uploading Python artifacts for version: $version"
Expand All @@ -221,7 +221,7 @@ jobs:
azcopy copy "$distFolder/*" "https://azuresdkpartnerdrops.blob.core.windows.net/drops/$blobPath/$version/"

$blobPathFull = "$blobPath/$version"
$partnerReleaseUrl = '${{ parameters.partnerReleasePipelineUrl }}'
$partnerReleaseUrl = "${{ parameters.partnerReleasePipelineUrl }}"

Write-Host ""
Write-Host "##[section]Upload complete. The partner-release pipeline will be triggered automatically in the next job."
Expand Down
Loading