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
13 changes: 7 additions & 6 deletions eng/pipelines/templates/jobs/build-azd-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ jobs:
parameters:
Condition: and(succeeded(), ne(variables['Skip.LiveTest'], 'true'))

# TODO: DRY this up, also incorporate CI/"daily" builds
- pwsh: |
$extVersion = Get-Content ./version.txt
Write-Host "##vso[task.setvariable variable=EXT_VERSION;]$extVersion"
workingDirectory: ${{ parameters.AzdExtensionDirectory }}
displayName: Set EXT_VERSION
- task: PowerShell@2
inputs:
pwsh: true
targetType: filePath
filePath: eng/scripts/Set-ExtensionVersionVariable.ps1
arguments: >-
-ExtensionDirectory ${{ parameters.AzdExtensionDirectory }}

- task: PowerShell@2
inputs:
Expand Down
14 changes: 8 additions & 6 deletions eng/pipelines/templates/jobs/cross-build-azd-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ jobs:
parameters:
Condition: false

# TODO: DRY this up, also incorporate CI/"daily" builds
- pwsh: |
$extVersion = Get-Content ./version.txt
Write-Host "##vso[task.setvariable variable=EXT_VERSION;]$extVersion"
workingDirectory: ${{ parameters.AzdExtensionDirectory }}
displayName: Set EXT_VERSION
- task: PowerShell@2
displayName: Set extension version variable
inputs:
pwsh: true
targetType: filePath
filePath: eng/scripts/Set-ExtensionVersionVariable.ps1
arguments: >-
-ExtensionDirectory ${{ parameters.AzdExtensionDirectory }}

- task: PowerShell@2
inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,15 @@ stages:

steps:
- checkout: self
# TODO: DRY this up
- pwsh: |
$extVersion = Get-Content ./version.txt
Write-Host "##vso[task.setvariable variable=EXT_VERSION;]$extVersion"
workingDirectory: ${{ parameters.AzdExtensionDirectory }}
displayName: Set EXT_VERSION

- task: PowerShell@2
displayName: Set extension version variable
inputs:
pwsh: true
targetType: filePath
filePath: eng/scripts/Set-ExtensionVersionVariable.ps1
arguments: >-
-ExtensionDirectory ${{ parameters.AzdExtensionDirectory }}

# Create changelog
- pwsh: New-Item -ItemType Directory -Path changelog
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/templates/stages/release-azd-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ stages:
- ${{ if eq(variables['Build.Reason'], 'Manual') }}:
- template: /eng/pipelines/templates/stages/sign-extension.yml
parameters:
# TODO: This should be a constant
SanitizedExtensionId: ${{ parameters.SanitizedExtensionId }}

- template: /eng/pipelines/templates/stages/publish-extension.yml
Expand Down
7 changes: 7 additions & 0 deletions eng/scripts/Set-ExtensionVersionVariable.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
param(
[string] $ExtensionDirectory
)

$extVersion = Get-Content "$ExtensionDirectory/version.txt"
Write-Host "Extension Version: $extVersion"
Write-Host "##vso[task.setvariable variable=EXT_VERSION;]$extVersion"