Migrate to new deb repo (#114527)
* migrate to new deb repo * improve deb migration
This commit is contained in:
parent
7fa8f1aa7f
commit
09bc6fc64b
|
@ -95,11 +95,6 @@ function prepareDebPackage(arch) {
|
|||
|
||||
const postinst = gulp.src('resources/linux/debian/postinst.template', { base: '.' })
|
||||
.pipe(replace('@@NAME@@', product.applicationName))
|
||||
.pipe(replace('@@ARCHITECTURE@@', debArch))
|
||||
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
|
||||
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
|
||||
.pipe(replace('@@REPOSITORY_NAME@@', arch === 'x64' ? 'vscode' : 'code'))
|
||||
.pipe(replace('@@SUPPORTED_ARCHITECTURES@@', arch === 'x64' ? 'amd64' : 'amd64,arm64,armhf'))
|
||||
.pipe(rename('DEBIAN/postinst'));
|
||||
|
||||
const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, workspaceMime, icon, bash_completion, zsh_completion, code);
|
||||
|
|
|
@ -66,13 +66,16 @@ NdCFTW7wY0Fb1fWJ+/KTsC4=
|
|||
if [ ! -f $CODE_SOURCE_PART ]; then
|
||||
# Write source list if it does not exist
|
||||
WRITE_SOURCE=1
|
||||
elif grep -q "# disabled on upgrade to" /etc/apt/sources.list.d/vscode.list; then
|
||||
elif grep -Eq "http:\/\/packages\.microsoft\.com\/repos\/vscode" $CODE_SOURCE_PART; then
|
||||
# Migrate from old repository
|
||||
WRITE_SOURCE=1
|
||||
elif grep -q "# disabled on upgrade to" $CODE_SOURCE_PART; then
|
||||
# Write source list if it was disabled by OS upgrade
|
||||
WRITE_SOURCE=1
|
||||
fi
|
||||
if [ "$WRITE_SOURCE" -eq "1" ]; then
|
||||
echo "### THIS FILE IS AUTOMATICALLY CONFIGURED ###
|
||||
# You may comment out this entry, but any other modifications may be lost.
|
||||
deb [arch=@@SUPPORTED_ARCHITECTURES@@] http://packages.microsoft.com/repos/@@REPOSITORY_NAME@@ stable main" > $CODE_SOURCE_PART
|
||||
deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main" > $CODE_SOURCE_PART
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue