Skip to content

Commit f052752

Browse files
committed
update to match autopep8
1 parent 38a3268 commit f052752

File tree

3 files changed

+31
-22
lines changed

3 files changed

+31
-22
lines changed

build/azure-devdiv-pipeline.pre-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ extends:
7575

7676
- task: NodeTool@0
7777
inputs:
78-
versionSpec: '22.x'
78+
versionSpec: '22.17.0'
7979
checkLatest: true
8080
displayName: Select Node 22 LTS
8181

8282
- task: UsePythonVersion@0
8383
inputs:
84-
versionSpec: '3.10' # note Install Python dependencies step below relies on Python 3.9
84+
versionSpec: '3.9' # note Install Python dependencies step below relies on Python 3.9
8585
addToPath: true
8686
architecture: 'x64'
8787
displayName: Select Python version
@@ -113,6 +113,8 @@ extends:
113113
workingDirectory: $(Build.StagingDirectory)\drop
114114
signType: real
115115
verifySignature: true
116+
teamName: $(TeamName)
117+
preRelease: true
116118

117119
- ${{ if eq(parameters.publishExtension, true) }}:
118120
- template: build/templates/publish.yml@self

build/templates/publish.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ parameters:
3939
- name: preRelease
4040
type: boolean
4141
default: false
42-
- name: noVerify
43-
type: boolean
44-
default: true
4542

4643
steps:
4744
# Node & vsce expected to be prepared by parent pipeline; omit local installation.
@@ -89,17 +86,14 @@ steps:
8986
Write-Host "Listing publish folder contents: $root"
9087
Get-ChildItem -Recurse $root | Select-Object FullName,Length | Format-Table -AutoSize
9188
92-
$extraFlags = ''
93-
if ('${{ parameters.noVerify }}' -eq 'True') { $extraFlags = "$extraFlags --noVerify" }
94-
9589
if ('${{ parameters.preRelease }}' -eq 'True') {
9690
Write-Host 'Publishing as pre-release'
97-
# disabled for now; uncomment when ready
98-
npx vsce publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath $extraFlags --pre-release
91+
Write-Host "Executing: npx vsce publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --pre-release"
92+
npx vsce publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --pre-release
9993
} else {
10094
Write-Host 'Publishing as stable release'
101-
# disabled for now; uncomment when ready
102-
npx vsce publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath $extraFlags
95+
Write-Host "Executing: npx vsce publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath"
96+
npx vsce publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath
10397
}
10498
10599
if ($LASTEXITCODE -ne 0) {

build/templates/sign.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# vsixName: autopep8.vsix
66
# workingDirectory: $(Build.SourcesDirectory)
77
# signType: real
8-
# Note: vsce CLI is invoked via 'npx vsce' (devDependency), no global install required.
9-
108
parameters:
119
- name: vsixName
1210
type: string
@@ -29,11 +27,11 @@ parameters:
2927
- name: prepareRoot
3028
type: boolean
3129
default: true
32-
# vsceVersion parameter removed; rely on pinned devDependency version via npx.
30+
- name: teamName
31+
type: string
32+
default: VSCode-autopep8
3333

3434
steps:
35-
# vsce CLI expected to be installed by parent pipeline; no local install here.
36-
3735
- task: NuGetToolInstaller@1
3836
displayName: Install NuGet
3937

@@ -69,15 +67,30 @@ steps:
6967
$sig = Join-Path $wd $signatureName
7068
if (!(Test-Path $sig)) { Write-Warning "Signature placeholder missing (will attempt signing anyway)." }
7169
72-
# Deprecated prepareRoot step removed: we now sign directly in workingDirectory by overriding BaseOutputDirectory.
70+
# ✅ Added MicroBuildSigningPlugin for PME enforcement
71+
- task: MicroBuildSigningPlugin@4
72+
displayName: Enable MicroBuild Signing
73+
inputs:
74+
signType: ${{ parameters.signType }} # 'real' or 'test'
75+
zipSources: false
76+
feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
77+
ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)'
78+
ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
79+
env:
80+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
81+
TeamName: ${{ parameters.teamName }}
7382

7483
- task: MSBuild@1
7584
displayName: Run signing (MSBuild)
7685
inputs:
7786
solution: '$(Build.SourcesDirectory)/build/sign.proj'
78-
msbuildArguments: '/verbosity:detailed /bl:"${{ parameters.workingDirectory }}\\signing.binlog" /p:SignType=${{ parameters.signType }} /p:BaseOutputDirectory=${{ parameters.workingDirectory }} /p:OutDir=${{ parameters.workingDirectory }} /p:IntermediateOutputPath=${{ parameters.workingDirectory }}\\intermediate'
79-
80-
# No copy-back needed; signing outputs now land directly in workingDirectory.
87+
msbuildArguments: >
88+
/verbosity:detailed
89+
/bl:"${{ parameters.workingDirectory }}\\signing.binlog"
90+
/p:SignType=${{ parameters.signType }}
91+
/p:BaseOutputDirectory=${{ parameters.workingDirectory }}
92+
/p:OutDir=${{ parameters.workingDirectory }}
93+
/p:IntermediateOutputPath=${{ parameters.workingDirectory }}\\intermediate
8194
8295
- task: PowerShell@2
8396
displayName: Post-sign inspection
@@ -132,7 +145,7 @@ steps:
132145
if (!(Test-Path $vsix)) { Write-Error "Missing VSIX: $vsix"; exit 1 }
133146
if (!(Test-Path $manifest)) { Write-Error "Missing manifest: $manifest"; exit 1 }
134147
if (!(Test-Path $signature)) { Write-Error "Missing signature file: $signature"; exit 1 }
135-
npx vsce verify-signature --packagePath "$vsix" --manifestPath "$manifest" --signaturePath "$signature"
148+
npx @vscode/vsce verify-signature --packagePath "$vsix" --manifestPath "$manifest" --signaturePath "$signature"
136149
if ($LASTEXITCODE -ne 0) {
137150
Write-Error "vsce verify-signature failed with exit code $LASTEXITCODE"
138151
exit $LASTEXITCODE

0 commit comments

Comments
 (0)