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
21 changes: 18 additions & 3 deletions .pipelines/templates/package-store-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,24 @@ jobs:
$currentChannel = if ($IsLTS) { 'LTS' }
elseif ($IsStable) { 'Stable' }
elseif ($IsPreview) { 'Preview' }
else {
Write-Error "No valid channel detected"
exit 1
else { $null }

if (-not $currentChannel) {
Write-Host "##[warning]No release channel selected (LTS/Stable/Preview all false). Skipping Store package creation."
Write-Host "##vso[task.setvariable variable=SkipStorePublish]true"
# Set channel flags so any downstream conditioned tasks evaluate to skip.
Write-Host "##vso[task.setvariable variable=LTS]false"
Write-Host "##vso[task.setvariable variable=STABLE]false"
Write-Host "##vso[task.setvariable variable=PREVIEW]false"
# Ensure the output directory exists so downstream artifact publishing does not fail.
$outputDirectory = "$(ob_outputDirectory)"
if (-not (Test-Path -LiteralPath $outputDirectory)) {
New-Item -ItemType Directory -Path $outputDirectory -Force | Out-Null
}
return
}

Write-Host "##vso[task.setvariable variable=SkipStorePublish]false"

$config = $channelConfigs[$currentChannel]
Write-Verbose -Verbose "Selected channel: $currentChannel"
Expand Down Expand Up @@ -242,3 +256,4 @@ jobs:
exit 1
}
displayName: 'Upload StoreBroker Package'
condition: and(succeeded(), ne(variables['SkipStorePublish'], 'true'))
14 changes: 9 additions & 5 deletions .pipelines/templates/release-MSIX-Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
displayName: 'Capture ReleaseTag and Downloaded Packages'

- task: PowerShell@2
condition: or(eq(variables['LTS'], 'true'), eq(variables['STABLE'], 'true'), eq(variables['PREVIEW'], 'true'))
Comment thread
TravisEz13 marked this conversation as resolved.
inputs:
targetType: inline
script: |
Expand Down Expand Up @@ -70,23 +71,26 @@ jobs:
displayName: 'Add Changelog Link and Version Number to SBJSON'

- task: PowerShell@2
condition: or(eq(variables['LTS'], 'true'), eq(variables['STABLE'], 'true'), eq(variables['PREVIEW'], 'true'))
Comment thread
TravisEz13 marked this conversation as resolved.
inputs:
targetType: inline
script: |
# Convert ADO variables to PowerShell boolean variables
$IsLTS = '$(LTS)' -eq 'true'
$IsStable = '$(STABLE)' -eq 'true'
$IsStable = '$(STABLE)' -eq 'true'
$IsPreview = '$(PREVIEW)' -eq 'true'

Write-Verbose -Verbose "Channel Selection - LTS: $(LTS), Stable: $(STABLE), Preview: $(PREVIEW)"

$currentChannel = if ($IsLTS) { 'LTS' }
elseif ($IsStable) { 'Stable' }
elseif ($IsPreview) { 'Preview' }
else {
Write-Error "No valid channel detected"
exit 1
}
else { $null }

if (-not $currentChannel) {
Write-Host "##[warning]No release channel selected (LTS/Stable/Preview all false). Skipping Store publish."
return
}

# Assign AppID for Store-Publish Task
$appID = $null
Expand Down
Loading