update signing, update to node 20, @vscode/vsce (#647)

* update signing, update to node 20, @vscode/vsce

* fix signvsix and switch cp to copy

* update changelog

* fix typo
This commit is contained in:
Garrett Campbell 2024-09-11 13:16:33 -04:00 коммит произвёл GitHub
Родитель b477230b20
Коммит f5b805ed6d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
12 изменённых файлов: 634 добавлений и 112 удалений

2
.github/workflows/ci-linux.yml поставляемый
Просмотреть файл

@ -28,7 +28,7 @@ jobs:
- name: Setup Node.js environment - name: Setup Node.js environment
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '16' node-version: '20'
# Set this option if you want the action to check for the latest available version that satisfies the version spec # Set this option if you want the action to check for the latest available version that satisfies the version spec
check-latest: true check-latest: true

2
.github/workflows/ci-windows.yml поставляемый
Просмотреть файл

@ -28,7 +28,7 @@ jobs:
- name: Setup Node.js environment - name: Setup Node.js environment
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '16' node-version: '20'
# Set this option if you want the action to check for the latest available version that satisfies the version spec # Set this option if you want the action to check for the latest available version that satisfies the version spec
check-latest: true check-latest: true

2
.github/workflows/main.yml поставляемый
Просмотреть файл

@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js environment - name: Setup Node.js environment
uses: actions/setup-node@v2.1.2 uses: actions/setup-node@v2.1.2
with: with:
node-version: '16' node-version: '20'
check-latest: true check-latest: true
- name: Get Short SHA - name: Get Short SHA
id: get-short-sha id: get-short-sha

Просмотреть файл

@ -6,6 +6,10 @@ Bug Fixes:
- Ensure that we append line endings, which fixes a recent regression. [#641](https://github.com/microsoft/vscode-makefile-tools/issues/641) - Ensure that we append line endings, which fixes a recent regression. [#641](https://github.com/microsoft/vscode-makefile-tools/issues/641)
Improvements:
- Update signing to support VSCode extension signing. [#647](https://github.com/microsoft/vscode-makefile-tools/pull/647)
## 0.10.26 ## 0.10.26
Bug Fixes: Bug Fixes:

Просмотреть файл

@ -10,8 +10,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<FilesToSign Include="$(OutDir)\**\*.vsix"> <FilesToSign Include="$(OutDir)\vsix\extension.signature.p7s">
<Authenticode>VsixSHA2</Authenticode> <Authenticode>VSCodePublisher</Authenticode>
</FilesToSign> </FilesToSign>
</ItemGroup> </ItemGroup>

Просмотреть файл

@ -72,9 +72,9 @@ extends:
fetchTags: false fetchTags: false
- task: NodeTool@0 - task: NodeTool@0
displayName: Use Node 18.x displayName: Use Node 20.x
inputs: inputs:
versionSpec: 18.x versionSpec: 20.x
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
displayName: Use Yarn 1.x displayName: Use Yarn 1.x
@ -87,7 +87,7 @@ extends:
- task: Npm@0 - task: Npm@0
displayName: npm install vsce displayName: npm install vsce
inputs: inputs:
arguments: -g vsce arguments: -g @vscode/vsce
- task: CmdLine@2 - task: CmdLine@2
displayName: Run VSCE to package vsix displayName: Run VSCE to package vsix
@ -100,7 +100,7 @@ extends:
displayName: npm uninstall vsce displayName: npm uninstall vsce
inputs: inputs:
command: uninstall command: uninstall
arguments: -g vsce arguments: -g @vscode/vsce
- task: DeleteFiles@1 - task: DeleteFiles@1
displayName: Remove code that should not be scanned displayName: Remove code that should not be scanned

Просмотреть файл

@ -45,13 +45,13 @@ extends:
ignoreLASTEXITCODE: true ignoreLASTEXITCODE: true
displayName: "Set the release name" displayName: "Set the release name"
- task: NodeTool@0 - task: NodeTool@0
displayName: "Use Node 18.x" displayName: "Use Node 20.x"
inputs: inputs:
versionSpec: 18.x versionSpec: 20.x
- task: Npm@0 - task: Npm@0
displayName: "install vsce" displayName: "install vsce"
inputs: inputs:
arguments: "-g vsce" arguments: "-g @vscode/vsce"
- task: AzureCLI@2 - task: AzureCLI@2
displayName: "Generate AAD_TOKEN" displayName: "Generate AAD_TOKEN"
inputs: inputs:
@ -62,7 +62,7 @@ extends:
$aadToken = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv $aadToken = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv
Write-Host "##vso[task.setvariable variable=AAD_TOKEN;issecret=true]$aadToken" Write-Host "##vso[task.setvariable variable=AAD_TOKEN;issecret=true]$aadToken"
- script: | - script: |
vsce publish --packagePath $(Build.StagingDirectory)\vsix\makefile-tools.vsix --pre-release vsce publish --packagePath $(Build.StagingDirectory)\vsix\makefile-tools.vsix --pre-release --manifestPath $(Build.StagingDirectory)\vsix\extension.manifest --signaturePath $(Build.StagingDirectory)\vsix\extension.signature.p7s
displayName: "Publish the VSIX" displayName: "Publish the VSIX"
env: env:
VSCE_PAT: $(AAD_TOKEN) VSCE_PAT: $(AAD_TOKEN)

Просмотреть файл

@ -68,13 +68,13 @@ extends:
targetPath: $(Build.StagingDirectory)\vsix targetPath: $(Build.StagingDirectory)\vsix
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
displayName: "Use Node 18.x" displayName: "Use Node 20.x"
inputs: inputs:
versionSpec: 18.x versionSpec: 20.x
- task: Npm@0 - task: Npm@0
displayName: "install vsce" displayName: "install vsce"
inputs: inputs:
arguments: "-g vsce" arguments: "-g @vscode/vsce"
- task: AzureCLI@2 - task: AzureCLI@2
displayName: "Generate AAD_TOKEN" displayName: "Generate AAD_TOKEN"
inputs: inputs:
@ -85,7 +85,7 @@ extends:
$aadToken = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv $aadToken = az account get-access-token --query accessToken --resource $(AzureGuid) -o tsv
Write-Host "##vso[task.setvariable variable=AAD_TOKEN;issecret=true]$aadToken" Write-Host "##vso[task.setvariable variable=AAD_TOKEN;issecret=true]$aadToken"
- script: | - script: |
vsce publish --packagePath $(Build.StagingDirectory)\vsix\makefile-tools.vsix vsce publish --packagePath $(Build.StagingDirectory)\vsix\makefile-tools.vsix --manifestPath $(Build.StagingDirectory)\vsix\extension.manifest --signaturePath $(Build.StagingDirectory)\vsix\extension.signature.p7s
displayName: "Publish the VSIX" displayName: "Publish the VSIX"
env: env:
VSCE_PAT: $(AAD_TOKEN) VSCE_PAT: $(AAD_TOKEN)

Просмотреть файл

@ -17,9 +17,9 @@ steps:
zipSources: false zipSources: false
- task: NodeTool@0 - task: NodeTool@0
displayName: Use Node 18.x displayName: Use Node 20.x
inputs: inputs:
versionSpec: 18.x versionSpec: 20.x
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
displayName: Use Yarn 1.x displayName: Use Yarn 1.x
@ -32,7 +32,7 @@ steps:
- task: Npm@0 - task: Npm@0
displayName: npm install VSCE displayName: npm install VSCE
inputs: inputs:
arguments: -g vsce arguments: -g @vscode/vsce
- task: PowerShell@2 - task: PowerShell@2
displayName: Set build name displayName: Set build name
@ -86,6 +86,18 @@ steps:
mkdir $(Build.ArtifactStagingDirectory)\vsix mkdir $(Build.ArtifactStagingDirectory)\vsix
if "${{parameters.IsPreRelease}}"=="1" (vsce package --yarn -o $(Build.ArtifactStagingDirectory)\vsix\makefile-tools.vsix --pre-release) else (vsce package --yarn -o $(Build.ArtifactStagingDirectory)\vsix\makefile-tools.vsix) if "${{parameters.IsPreRelease}}"=="1" (vsce package --yarn -o $(Build.ArtifactStagingDirectory)\vsix\makefile-tools.vsix --pre-release) else (vsce package --yarn -o $(Build.ArtifactStagingDirectory)\vsix\makefile-tools.vsix)
- task: CmdLine@2
displayName: Generate Extension Manifest
inputs:
script: |
vsce generate-manifest -i $(Build.ArtifactStagingDirectory)\vsix\makefile-tools.vsix -o $(Build.ArtifactStagingDirectory)\vsix\extension.manifest
- task: CmdLine@2
displayName: Prepare manifest for signing
inputs:
script: |
copy $(Build.ArtifactStagingDirectory)\vsix\extension.manifest $(Build.ArtifactStagingDirectory)\vsix\extension.signature.p7s
- task: MSBuild@1 - task: MSBuild@1
displayName: Sign VSIX displayName: Sign VSIX
inputs: inputs:

Просмотреть файл

@ -864,9 +864,10 @@
}, },
"devDependencies": { "devDependencies": {
"@types/mocha": "^9.0.0", "@types/mocha": "^9.0.0",
"@types/node": "^10.17.17", "@types/node": "^20.14.2",
"@types/uuid": "^9.0.7", "@types/uuid": "^9.0.7",
"@types/vscode": "^1.74.0", "@types/vscode": "^1.74.0",
"@vscode/vsce": "^3.1.0",
"tslint": "^5.20.1", "tslint": "^5.20.1",
"tslint-microsoft-contrib": "^6.2.0", "tslint-microsoft-contrib": "^6.2.0",
"tslint-no-unused-expression-chai": "^0.1.4", "tslint-no-unused-expression-chai": "^0.1.4",
@ -877,7 +878,6 @@
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"chai-string": "^1.5.0", "chai-string": "^1.5.0",
"typescript": "^5.0.2", "typescript": "^5.0.2",
"vsce": "^1.95.0",
"vrsource-tslint-rules": "^6.0.0", "vrsource-tslint-rules": "^6.0.0",
"vscode-nls-dev": "^3.3.2", "vscode-nls-dev": "^3.3.2",
"gulp": "^4.0.2", "gulp": "^4.0.2",

Просмотреть файл

@ -417,16 +417,18 @@ export function spawnChildProcess(
qArgs, qArgs,
{ cwd: workingDirectory, shell: shellType || true, env: finalEnvironment } { cwd: workingDirectory, shell: shellType || true, env: finalEnvironment }
); );
make.setCurPID(child.pid); if (child.pid) {
make.setCurPID(child.pid);
}
if (stdoutCallback) { if (stdoutCallback) {
child.stdout.on("data", (data) => { child.stdout?.on("data", (data) => {
stdoutCallback(`${data}`); stdoutCallback(`${data}`);
}); });
} }
if (stderrCallback) { if (stderrCallback) {
child.stderr.on("data", (data) => { child.stderr?.on("data", (data) => {
stderrCallback(`${data}`); stderrCallback(`${data}`);
}); });
} }

678
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу