|
71 | 71 | - ${{ each platform in parameters.buildPlatforms }}: |
72 | 72 | - task: PowerShell@2 |
73 | 73 | displayName: "Publish extension (${{ coalesce(platform.vsceTarget, 'universal') }})" |
74 | | - env: |
75 | | - EnabledApiProposalsJson: ${{ parameters.enabledApiProposalsJson }} |
76 | 74 | inputs: |
77 | 75 | targetType: inline |
78 | 76 | script: | |
@@ -105,51 +103,16 @@ steps: |
105 | 103 | Write-Host "Listing platform folder contents:" |
106 | 104 | Get-ChildItem $root | Select-Object Name,Length | Format-Table -AutoSize |
107 | 105 |
|
108 | | - # If the extension uses proposed APIs, vsce requires explicitly allowing them. |
109 | | - # We expect EnabledApiProposalsJson to be set by an earlier step (e.g. publish-extension.yml). |
110 | | - $allowProposedApisArgs = @() |
111 | | - $enabledApiProposalsJson = $env:EnabledApiProposalsJson |
112 | | - if ([string]::IsNullOrWhiteSpace($enabledApiProposalsJson)) { |
113 | | - Write-Host "EnabledApiProposalsJson is not set; publishing without --allow-proposed-apis." |
114 | | - } else { |
115 | | - try { |
116 | | - $parsedEnabledApiProposals = ConvertFrom-Json -InputObject $enabledApiProposalsJson |
117 | | - $enabledApiProposals = @() |
118 | | -
|
119 | | - if ($null -ne $parsedEnabledApiProposals) { |
120 | | - foreach ($proposal in @($parsedEnabledApiProposals)) { |
121 | | - if (-not [string]::IsNullOrWhiteSpace([string]$proposal)) { |
122 | | - $enabledApiProposals += [string]$proposal |
123 | | - } |
124 | | - } |
125 | | - } |
126 | | -
|
127 | | - if ($enabledApiProposals.Count -gt 0) { |
128 | | - Write-Host ("enabledApiProposals (from EnabledApiProposalsJson): " + ($enabledApiProposals -join ', ')) |
129 | | - $allowProposedApisArgs = @('--allow-proposed-apis') + $enabledApiProposals |
130 | | - } else { |
131 | | - Write-Host "EnabledApiProposalsJson parsed as empty; no proposed API allowlist flags needed." |
132 | | - } |
133 | | - } catch { |
134 | | - Write-Host "EnabledApiProposalsJson was set but could not be parsed; publishing without --allow-proposed-apis." |
135 | | - } |
136 | | - } |
137 | | -
|
138 | | - $allowProposedApisDisplay = ($allowProposedApisArgs -join ' ') |
139 | | -
|
140 | 106 | if ('${{ parameters.preRelease }}' -eq 'True') { |
141 | 107 | Write-Host 'Publishing as pre-release' |
142 | | - $displayCmd = "Executing: npx @vscode/vsce@latest publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath" |
143 | | - if ($allowProposedApisDisplay) { $displayCmd += " $allowProposedApisDisplay" } |
144 | | - $displayCmd += ' --pre-release' |
| 108 | + $displayCmd = "Executing: npx @vscode/vsce@latest publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --no-verify --pre-release" |
145 | 109 | Write-Host $displayCmd |
146 | | - npx @vscode/vsce@latest publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath $allowProposedApisArgs --pre-release |
| 110 | + npx @vscode/vsce@latest publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --no-verify --pre-release |
147 | 111 | } else { |
148 | 112 | Write-Host 'Publishing as stable release' |
149 | | - $displayCmd = "Executing: npx @vscode/vsce@latest publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath" |
150 | | - if ($allowProposedApisDisplay) { $displayCmd += " $allowProposedApisDisplay" } |
| 113 | + $displayCmd = "Executing: npx @vscode/vsce@latest publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --no-verify" |
151 | 114 | Write-Host $displayCmd |
152 | | - npx @vscode/vsce@latest publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath $allowProposedApisArgs |
| 115 | + npx @vscode/vsce@latest publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --no-verify |
153 | 116 | } |
154 | 117 |
|
155 | 118 | if ($LASTEXITCODE -ne 0) { |
|
0 commit comments