Skip to content

Commit

Permalink
Add ability to apply user specific patches to vscode source
Browse files Browse the repository at this point in the history
  • Loading branch information
Swinder Pal Singh Juneja committed Jun 21, 2021
1 parent 8bb2491 commit 64e101b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions patches/user/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
store user patches at location patches/user and those will be applied to vscode source git by the scripts
16 changes: 12 additions & 4 deletions prepare_vscode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ patch -u src/vs/platform/update/electron-main/updateService.win32.ts -i ../patch
patch -u resources/linux/rpm/code.spec.template -i ../patches/fix-rpm-spec.patch
git apply --ignore-whitespace ../patches/binary-name.patch
git apply --ignore-whitespace ../patches/custom-gallery.patch
for file in ../patches/user/*.patch; do
if [ -f "$file" ]; then
echo applying user patch: $file;
if ! git apply --ignore-whitespace $file; then
echo failed to apply patch $file 1>&2
fi
fi
done

if [[ "$OS_NAME" == "osx" ]]; then
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --ignore-optional
Expand Down Expand Up @@ -65,27 +73,27 @@ if [[ "$OS_NAME" == "linux" ]]; then
# as we are renaming the application to vscodium
# we need to edit a line in the post install template
sed -i "s/code-oss/codium/" resources/linux/debian/postinst.template

# fix the packages metadata
# code.appdata.xml
sed -i 's|Visual Studio Code|VSCodium|g' resources/linux/code.appdata.xml
sed -i 's|https://code.visualstudio.com/docs/setup/linux|https://github.com/VSCodium/vscodium#download-install|' resources/linux/code.appdata.xml
sed -i 's|https://code.visualstudio.com/home/home-screenshot-linux-lg.png|https://vscodium.com/img/vscodium.png|' resources/linux/code.appdata.xml
sed -i 's|https://code.visualstudio.com|https://vscodium.com|' resources/linux/code.appdata.xml

# control.template
sed -i 's|Microsoft Corporation <[email protected]>|VSCodium Team https://github.com/VSCodium/vscodium/graphs/contributors|' resources/linux/debian/control.template
sed -i 's|https://code.visualstudio.com|https://vscodium.com|' resources/linux/debian/control.template
sed -i 's|Visual Studio Code|VSCodium|g' resources/linux/debian/control.template
sed -i 's|https://code.visualstudio.com/docs/setup/linux|https://github.com/VSCodium/vscodium#download-install|' resources/linux/debian/control.template

# code.spec.template
sed -i 's|https://code.visualstudio.com/docs/setup/linux|https://github.com/VSCodium/vscodium#download-install|' resources/linux/rpm/code.spec.template
sed -i 's|Microsoft Corporation|VSCodium Team|' resources/linux/rpm/code.spec.template
sed -i 's|Visual Studio Code Team <[email protected]>|VSCodium Team https://github.com/VSCodium/vscodium/graphs/contributors|' resources/linux/rpm/code.spec.template
sed -i 's|https://code.visualstudio.com|https://vscodium.com|' resources/linux/rpm/code.spec.template
sed -i 's|Visual Studio Code|VSCodium|' resources/linux/rpm/code.spec.template

# snapcraft.yaml
sed -i 's|Visual Studio Code|VSCodium|' resources/linux/rpm/code.spec.template
fi
Expand Down

0 comments on commit 64e101b

Please sign in to comment.