Skip to content

Commit 7063963

Browse files
authored
fix: customize postinst by architecture (microsoft#259280)
Fixes microsoft#258886
1 parent 6bbf697 commit 7063963

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build/gulpfile.vscode.linux.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ function prepareDebPackage(arch) {
107107

108108
const postinst = gulp.src('resources/linux/debian/postinst.template', { base: '.' })
109109
.pipe(replace('@@NAME@@', product.applicationName))
110+
.pipe(replace('@@ARCHITECTURE@@', debArch))
110111
.pipe(rename('DEBIAN/postinst'));
111112

112113
const templates = gulp.src('resources/linux/debian/templates.template', { base: '.' })

resources/linux/debian/postinst.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Types: deb
9696
URIs: https://packages.microsoft.com/repos/code
9797
Suites: stable
9898
Components: main
99-
Architectures: amd64,arm64,armhf
99+
Architectures: @@ARCHITECTURE@@
100100
Signed-By: $CODE_TRUSTED_PART
101101
EOF
102102
if [ -f "$CODE_SOURCE_PART" ]; then
@@ -105,7 +105,7 @@ EOF
105105
else
106106
echo "### THIS FILE IS AUTOMATICALLY CONFIGURED ###
107107
# You may comment out this entry, but any other modifications may be lost.
108-
deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/repos/code stable main" > $CODE_SOURCE_PART
108+
deb [arch=@@ARCHITECTURE@@] https://packages.microsoft.com/repos/code stable main" > $CODE_SOURCE_PART
109109
fi
110110

111111
# Sourced from https://packages.microsoft.com/keys/microsoft.asc

0 commit comments

Comments
 (0)