Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit c1f11d0

Browse files
authored
Merge pull request #1435 from microsoft/dev/bemcmorr/reenable-vsix-signing
Re-enable VSIX signing
2 parents 05c4f1c + a4a4f3a commit c1f11d0

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

azure-pipelines.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,19 @@ steps:
115115
includeRootFolder: false
116116
archiveType: zip
117117
archiveFile: $(Build.StagingDirectory)\vscode-arduino.vsix
118-
- script: python .\build\markExecutableFiles.py
119-
displayName: Make serial monitor executable
120118
- task: MSBuild@1
121119
displayName: Sign VSIX
122120
inputs:
123121
solution: .\build\SignVsix.proj
124122
msbuildArguments: /p:SignType=$(SignType)
125123
# MicroBuild signing will always fail on public PRs.
126-
# TODO: Signing the VSIX strips out the "main" executables for
127-
# serial-monitor-cli on Mac and Linux, completely breaking serial
128-
# functionality in the extension on these platforms. For now we disable VSIX
129-
# signing because it's not a strict requirement, but we should investigate
130-
# if we can either add extensions to these files or support extensionless
131-
# files in VSIX signing.
132-
condition: and(false, ne(variables['Build.Reason'], 'PullRequest'))
124+
condition: ne(variables['Build.Reason'], 'PullRequest')
125+
# VSIX signing removes the executable attributes on files. Luckily, the
126+
# signature only seems to be based on the content of the files, not the
127+
# attributes, so we can safely go back and mark the serial monitor as
128+
# executable without invalidating the signature.
129+
- script: python .\build\markExecutableFiles.py
130+
displayName: Make serial monitor executable
133131
- publish: $(Build.StagingDirectory)\vscode-arduino.vsix
134132
artifact: VS Code extension VSIX
135133
displayName: Publish extension VSIX as artifact

build/markExecutableFiles.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
output_archive_path = f"{staging_directory}/vscode-arduino-out.vsix"
77

88
filenames = [
9-
"extension/out/serial-monitor-cli/darwin/main",
10-
"extension/out/serial-monitor-cli/linux/main"
9+
"extension/out/serial-monitor-cli/darwin/main.out",
10+
"extension/out/serial-monitor-cli/linux/main.out"
1111
]
1212

1313
input_archive = zipfile.ZipFile(input_archive_path, 'r')

src/serialmonitor/serialportctrl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class SerialPortCtrl {
5252
if (os.platform() === "win32") {
5353
fileName = "main.exe"
5454
} else if (os.platform() === "linux" || os.platform() === "darwin") {
55-
fileName = "main"
55+
fileName = "main.out"
5656
}
5757
const deviceContext = DeviceContext.getInstance();
5858
return path.resolve(deviceContext.extensionPath, "out", "serial-monitor-cli", `${os.platform}`, fileName);

0 commit comments

Comments
 (0)