mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-17 21:24:40 +10:00
Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3277bd4fa1 | ||
|
|
08b0b1b3e5 | ||
|
|
c46abc14ee | ||
|
|
5bd755a9cc | ||
|
|
1cbc6e55bf | ||
|
|
351460f992 | ||
|
|
f7e1c11ea7 | ||
|
|
50197bbeef | ||
|
|
b319b178ea | ||
|
|
2dab7cfcdf | ||
|
|
6a86200d38 | ||
|
|
c803059121 | ||
|
|
d529fd3c20 | ||
|
|
f817226abd | ||
|
|
353c002605 | ||
|
|
3f00a255b1 | ||
|
|
23152cf50f | ||
|
|
1f31a1c27b | ||
|
|
49eb715333 | ||
|
|
bbcdc2be11 | ||
|
|
dfd7ebbf85 | ||
|
|
e087f00ff1 | ||
|
|
79bc275386 | ||
|
|
851b5f2659 | ||
|
|
e5de9c3096 | ||
|
|
3b6954231f | ||
|
|
99840540ac | ||
|
|
3103c80234 | ||
|
|
6a4668040b | ||
|
|
02755e7599 | ||
|
|
36b06dd66b | ||
|
|
33a6670cad | ||
|
|
1ef601a79b | ||
|
|
c67c2ad9f5 | ||
|
|
d164e43b78 | ||
|
|
f3ba593ae7 | ||
|
|
78b32d7931 | ||
|
|
c71f2250ce | ||
|
|
b0154c7831 | ||
|
|
23313d41ba | ||
|
|
cf48030b59 | ||
|
|
848aabfe54 | ||
|
|
10a0cb4b30 | ||
|
|
0469329683 | ||
|
|
6acd2fbfe1 | ||
|
|
38810539a7 | ||
|
|
34b399c05a | ||
|
|
b0ff3b4f34 | ||
|
|
ca2dc5fcaf | ||
|
|
962326e182 | ||
|
|
d3371f8aab | ||
|
|
0f5a7d4a1b | ||
|
|
02cc193086 | ||
|
|
e564685c1e | ||
|
|
85cbd0b0f2 | ||
|
|
b748657b09 | ||
|
|
db02ad1133 | ||
|
|
573c0230c5 | ||
|
|
bb483f44e2 |
25
.editorconfig
Normal file
25
.editorconfig
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
tab_width = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.sh]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.patch]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
[*.svg]
|
||||||
|
insert_final_newline = false
|
||||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +0,0 @@
|
|||||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
|
||||||
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -30,7 +30,7 @@ A clear and concise description of what you expected to happen.
|
|||||||
If applicable, add screenshots to help explain your problem.
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
**Desktop (please complete the following information):**
|
||||||
- OS: [e.g. Mac OS, Ubuntu 16.04, etc]
|
- OS: [e.g. Mac OS, Ubuntu 20.04, etc]
|
||||||
- Architecture [e.g. x64, ia32, arm64]
|
- Architecture [e.g. x64, ia32, arm64]
|
||||||
- Version [e.g. 1.33.0]
|
- Version [e.g. 1.33.0]
|
||||||
|
|
||||||
|
|||||||
91
.github/workflows/linux.yml
vendored
91
.github/workflows/linux.yml
vendored
@@ -9,9 +9,9 @@ on:
|
|||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ${{ matrix.image }}
|
image: ${{ matrix.image }}
|
||||||
env:
|
env:
|
||||||
OS_NAME: 'linux'
|
OS_NAME: 'linux'
|
||||||
@@ -20,7 +20,6 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
vscode_arch: [x64, arm64, armhf]
|
|
||||||
include:
|
include:
|
||||||
- vscode_arch: x64
|
- vscode_arch: x64
|
||||||
npm_arch: x64
|
npm_arch: x64
|
||||||
@@ -35,6 +34,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install GH
|
||||||
|
run: ./install_gh.sh
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
@@ -43,12 +45,12 @@ jobs:
|
|||||||
- name: Install Yarn
|
- name: Install Yarn
|
||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
|
|
||||||
- name: Check PR or cron
|
|
||||||
run: ./check_cron_or_pr.sh
|
|
||||||
|
|
||||||
- name: Clone VSCode repo
|
- name: Clone VSCode repo
|
||||||
run: ./get_repo.sh
|
run: ./get_repo.sh
|
||||||
|
|
||||||
|
- name: Check PR or cron
|
||||||
|
run: ./check_cron_or_pr.sh
|
||||||
|
|
||||||
- name: Check existing VSCodium tags/releases
|
- name: Check existing VSCodium tags/releases
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -80,46 +82,61 @@ jobs:
|
|||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
if: env.SHOULD_BUILD == 'yes'
|
if: env.SHOULD_BUILD == 'yes'
|
||||||
|
|
||||||
- name: Zip release
|
- name: Prepare artifacts
|
||||||
run: |
|
run: ./prepare_artifacts.sh
|
||||||
cd VSCode-linux-${VSCODE_ARCH}
|
|
||||||
tar czf ../VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz .
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- name: Move/rename build artifacts
|
|
||||||
run: |
|
|
||||||
cp vscode/.build/linux/deb/*/deb/*.deb .
|
|
||||||
cp vscode/.build/linux/rpm/*/*.rpm .
|
|
||||||
|
|
||||||
if [[ "${VSCODE_ARCH}" == "x64" ]]; then
|
|
||||||
cp build/linux/appimage/out/*.AppImage* .
|
|
||||||
fi
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
|
|
||||||
- name: Generate shasums
|
|
||||||
run: ./sum.sh
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.MS_TAG }}
|
|
||||||
files: |
|
|
||||||
./*.sha256
|
|
||||||
./*.zip
|
|
||||||
./*.tar.gz
|
|
||||||
./*.deb
|
|
||||||
./*.rpm
|
|
||||||
./VSCodium-*.AppImage
|
|
||||||
./VSCodium-*.AppImage.zsync
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: ./release.sh
|
||||||
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- name: Update versions repo
|
- name: Update versions repo
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
run: ./update_version.sh
|
run: ./update_version.sh
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
||||||
GITHUB_USERNAME: ${{ github.repository_owner }}
|
GITHUB_USERNAME: ${{ github.repository_owner }}
|
||||||
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
|
snap:
|
||||||
|
needs: release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Check version
|
||||||
|
run: ./stores/snapcraft/check_version.sh
|
||||||
|
env:
|
||||||
|
ARCHITECTURE: ${{ matrix.platform }}
|
||||||
|
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
|
||||||
|
|
||||||
|
- uses: docker/setup-qemu-action@v1
|
||||||
|
if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
|
- uses: diddlesnaps/snapcraft-multiarch-action@v1
|
||||||
|
with:
|
||||||
|
path: stores/snapcraft
|
||||||
|
architecture: ${{ matrix.platform }}
|
||||||
|
id: build
|
||||||
|
if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
|
- uses: diddlesnaps/snapcraft-review-action@v1
|
||||||
|
with:
|
||||||
|
snap: ${{ steps.build.outputs.snap }}
|
||||||
|
isClassic: 'true'
|
||||||
|
if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
|
- uses: snapcore/action-publish@v1
|
||||||
|
with:
|
||||||
|
store_login: ${{ secrets.SNAP_STORE_LOGIN }}
|
||||||
|
snap: ${{ steps.build.outputs.snap }}
|
||||||
|
release: stable
|
||||||
|
if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|||||||
58
.github/workflows/macos.yml
vendored
58
.github/workflows/macos.yml
vendored
@@ -10,31 +10,39 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macOS-latest
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- vscode_arch: x64
|
||||||
|
os: macOS-10.15
|
||||||
|
# - vscode_arch: arm64
|
||||||
|
# os: macOS-11
|
||||||
|
|
||||||
env:
|
env:
|
||||||
OS_NAME: "osx"
|
OS_NAME: "osx"
|
||||||
VSCODE_ARCH: "x64"
|
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- name: Check PR or cron
|
|
||||||
run: |
|
|
||||||
. check_cron_or_pr.sh
|
|
||||||
|
|
||||||
- name: Clone VSCode repo
|
- name: Clone VSCode repo
|
||||||
run: |
|
run: . get_repo.sh
|
||||||
. get_repo.sh
|
|
||||||
|
- name: Check PR or cron
|
||||||
|
run: . check_cron_or_pr.sh
|
||||||
|
|
||||||
- name: Check existing VSCodium tags/releases
|
- name: Check existing VSCodium tags/releases
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: . check_tags.sh
|
||||||
. check_tags.sh
|
|
||||||
if: env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- name: Compute cache key
|
- name: Compute cache key
|
||||||
@@ -81,35 +89,15 @@ jobs:
|
|||||||
codesign --deep --force --verbose --sign "$CERTIFICATE_OSX_ID" VSCodium.app
|
codesign --deep --force --verbose --sign "$CERTIFICATE_OSX_ID" VSCodium.app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Zip release
|
- name: Prepare artifacts
|
||||||
run: |
|
run: ./prepare_artifacts.sh
|
||||||
cd "VSCode-darwin-${VSCODE_ARCH}"
|
|
||||||
zip -r -X -y ../VSCodium-darwin-${VSCODE_ARCH}-${MS_TAG}.zip ./*.app
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- name: DMG the release
|
|
||||||
run: |
|
|
||||||
pushd "VSCode-darwin-${VSCODE_ARCH}"
|
|
||||||
npx create-dmg VSCodium.app ..
|
|
||||||
mv "../VSCodium ${MS_TAG}.dmg" "../VSCodium.${VSCODE_ARCH}.${MS_TAG}.dmg"
|
|
||||||
popd
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
|
|
||||||
- name: Generate shasums
|
|
||||||
run: ./sum.sh
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.MS_TAG }}
|
|
||||||
files: |
|
|
||||||
./*.zip
|
|
||||||
./*.dmg
|
|
||||||
./*.sha256
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: ./release.sh
|
||||||
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- name: Update versions repo
|
- name: Update versions repo
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|||||||
52
.github/workflows/windows.yml
vendored
52
.github/workflows/windows.yml
vendored
@@ -11,6 +11,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-2016
|
runs-on: windows-2016
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
env:
|
env:
|
||||||
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
||||||
OS_NAME: 'windows'
|
OS_NAME: 'windows'
|
||||||
@@ -20,13 +23,7 @@ jobs:
|
|||||||
vscode_arch: [x64, ia32, arm64]
|
vscode_arch: [x64, ia32, arm64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout github repo (+ download lfs dependencies)
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
|
|
||||||
- name: Checkout LFS objects
|
|
||||||
run: git lfs checkout
|
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
@@ -41,19 +38,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '2.x'
|
python-version: '2.x'
|
||||||
|
|
||||||
- name: Check PR or cron
|
|
||||||
run: ./check_cron_or_pr.sh
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Clone VSCode repo
|
- name: Clone VSCode repo
|
||||||
run: ./get_repo.sh
|
run: ./get_repo.sh
|
||||||
shell: bash
|
|
||||||
|
- name: Check PR or cron
|
||||||
|
run: ./check_cron_or_pr.sh
|
||||||
|
|
||||||
- name: Check existing VSCodium tags/releases
|
- name: Check existing VSCodium tags/releases
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./check_tags.sh
|
run: ./check_tags.sh
|
||||||
shell: bash
|
|
||||||
if: env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- name: Compute cache key
|
- name: Compute cache key
|
||||||
@@ -80,45 +74,21 @@ jobs:
|
|||||||
npm_config_arch: ${{ matrix.vscode_arch }}
|
npm_config_arch: ${{ matrix.vscode_arch }}
|
||||||
npm_config_target_arch: ${{ matrix.vscode_arch }}
|
npm_config_target_arch: ${{ matrix.vscode_arch }}
|
||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
shell: bash
|
|
||||||
if: env.SHOULD_BUILD == 'yes'
|
if: env.SHOULD_BUILD == 'yes'
|
||||||
|
|
||||||
- name: Move/rename build artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: ./prepare_artifacts.sh
|
||||||
mv vscode\\.build\\win32-${VSCODE_ARCH}\\system-setup\\VSCodeSetup.exe VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
|
||||||
mv vscode\\.build\\win32-${VSCODE_ARCH}\\user-setup\\VSCodeSetup.exe VSCodiumUserSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
|
||||||
mv vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip
|
|
||||||
|
|
||||||
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
|
||||||
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi .
|
|
||||||
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi .
|
|
||||||
fi
|
|
||||||
shell: bash
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- name: Generate shasums
|
|
||||||
run: ./sum.sh
|
|
||||||
shell: bash
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.MS_TAG }}
|
|
||||||
files: |
|
|
||||||
./*.sha256
|
|
||||||
./VSCodium*.zip
|
|
||||||
./VSCodiumUserSetup*.exe
|
|
||||||
./VSCodiumSetup*.exe
|
|
||||||
./VSCodium*.msi
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: ./release.sh
|
||||||
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- name: Update versions repo
|
- name: Update versions repo
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
run: ./update_version.sh
|
run: ./update_version.sh
|
||||||
shell: bash
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
||||||
GITHUB_USERNAME: ${{ github.repository_owner }}
|
GITHUB_USERNAME: ${{ github.repository_owner }}
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,6 +2,9 @@ vscode
|
|||||||
VS*/*
|
VS*/*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
build/linux/appimage/out
|
build/linux/appimage/out
|
||||||
|
build/linux/appimage/pkg2appimage.AppDir
|
||||||
|
build/linux/appimage/pkg2appimage-*.AppImage
|
||||||
|
build/linux/appimage/VSCodium
|
||||||
build/windows/msi/releasedir
|
build/windows/msi/releasedir
|
||||||
build/windows/rtf/Readme (Abridged).txt
|
build/windows/rtf/Readme (Abridged).txt
|
||||||
build/windows/rtf/TXT to RTF Converter.exe
|
build/windows/rtf/TXT to RTF Converter.exe
|
||||||
|
|||||||
24
DOCS.md
24
DOCS.md
@@ -11,6 +11,7 @@
|
|||||||
- [Migrating from Visual Studio Code to VSCodium](#migrating)
|
- [Migrating from Visual Studio Code to VSCodium](#migrating)
|
||||||
- [Sign in with GitHub](#signin-github)
|
- [Sign in with GitHub](#signin-github)
|
||||||
- [How do I run VSCodium in portable mode?](#portable)
|
- [How do I run VSCodium in portable mode?](#portable)
|
||||||
|
- [How do I fix the default file manager?](#file-manager)
|
||||||
- [How do I press and hold a key and have it repeat in VSCodium?](#press-and-hold)
|
- [How do I press and hold a key and have it repeat in VSCodium?](#press-and-hold)
|
||||||
- [How do I open VSCodium from the terminal?](#terminal-support)
|
- [How do I open VSCodium from the terminal?](#terminal-support)
|
||||||
- [From Linux .tar.gz](#from-linux-targz)
|
- [From Linux .tar.gz](#from-linux-targz)
|
||||||
@@ -82,13 +83,13 @@ with the content:
|
|||||||
|
|
||||||
### <a id="proprietary-debugging-tools"></a>Proprietary Debugging Tools
|
### <a id="proprietary-debugging-tools"></a>Proprietary Debugging Tools
|
||||||
|
|
||||||
The debugger provided with Microsoft's [C# extension](https://github.com/OmniSharp/omnisharp-vscode) as well as the (Windows) debugger provided with their [C++ extension](https://github.com/Microsoft/vscode-cpptools) are very restrictively licensed to only work with the offical Visual Studio Code build. See [this comment in the C# extension repo](https://github.com/OmniSharp/omnisharp-vscode/issues/2491#issuecomment-418811364) and [this comment in the C++ extension repo](https://github.com/Microsoft/vscode-cpptools/issues/21#issuecomment-248349017).
|
The debugger provided with Microsoft's [C# extension](https://github.com/OmniSharp/omnisharp-vscode) as well as the (Windows) debugger provided with their [C++ extension](https://github.com/Microsoft/vscode-cpptools) are very restrictively licensed to only work with the official Visual Studio Code build. See [this comment in the C# extension repo](https://github.com/OmniSharp/omnisharp-vscode/issues/2491#issuecomment-418811364) and [this comment in the C++ extension repo](https://github.com/Microsoft/vscode-cpptools/issues/21#issuecomment-248349017).
|
||||||
|
|
||||||
A workaround exists to get debugging working in C# projects, by using Samsung's opensource [netcoredbg](https://github.com/Samsung/netcoredbg) package. See [this comment](https://github.com/VSCodium/vscodium/issues/82#issue-409806641) for instructions on how to set that up.
|
A workaround exists to get debugging working in C# projects, by using Samsung's opensource [netcoredbg](https://github.com/Samsung/netcoredbg) package. See [this comment](https://github.com/VSCodium/vscodium/issues/82#issue-409806641) for instructions on how to set that up.
|
||||||
|
|
||||||
### <a id="proprietary-extensions"></a>Proprietary Extensions
|
### <a id="proprietary-extensions"></a>Proprietary Extensions
|
||||||
|
|
||||||
Like the debuggers mentioned above, some extensions you may find in the marketplace (like the [Remote Development Extensions](https://code.visualstudio.com/docs/remote/remote-overview)) only function with the offical Visual Studio Code build. You can work around this by adding the extension's internal ID (found on the extension's page) to the `extensionAllowedProposedApi` property of the product.json in your VSCodium installation. For example:
|
Like the debuggers mentioned above, some extensions you may find in the marketplace (like the [Remote Development Extensions](https://code.visualstudio.com/docs/remote/remote-overview)) only function with the official Visual Studio Code build. You can work around this by adding the extension's internal ID (found on the extension's page) to the `extensionAllowedProposedApi` property of the product.json in your VSCodium installation. For example:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"extensionAllowedProposedApi": [
|
"extensionAllowedProposedApi": [
|
||||||
@@ -134,10 +135,27 @@ Select the scopes dependending of the extension which need access to GitHub. (Gi
|
|||||||
If you are getting the error `Writing login information to the keychain failed with error 'The name org.freedesktop.secrets was not provided by any .service files'.`, you need to install the package `gnome-keyring`.
|
If you are getting the error `Writing login information to the keychain failed with error 'The name org.freedesktop.secrets was not provided by any .service files'.`, you need to install the package `gnome-keyring`.
|
||||||
|
|
||||||
## <a id="portable"></a>How do I run VSCodium in portable mode?
|
## <a id="portable"></a>How do I run VSCodium in portable mode?
|
||||||
You can follow the [Portable Mode instructions](https://code.visualstudio.com/docs/editor/portable) from the Visual Studio Code website.
|
You can follow the [Portable Mode instructions](https://code.visualstudio.com/docs/editor/portable) from the Visual Studio Code website.
|
||||||
- **Windows** / **Linux** : the instructions can be followed as written.
|
- **Windows** / **Linux** : the instructions can be followed as written.
|
||||||
- **macOS** : portable mode is enabled by the existence of a specially named folder. For Visual Studio Code that folder name is `code-portable-data`. For VSCodium, that folder name is `codium-portable-data`. So to enable portable mode for VSCodium on Mac OS, follow the instructions outlined in the [link above](https://code.visualstudio.com/docs/editor/portable), but create a folder named `codium-portable-data` instead of `code-portable-data`.
|
- **macOS** : portable mode is enabled by the existence of a specially named folder. For Visual Studio Code that folder name is `code-portable-data`. For VSCodium, that folder name is `codium-portable-data`. So to enable portable mode for VSCodium on Mac OS, follow the instructions outlined in the [link above](https://code.visualstudio.com/docs/editor/portable), but create a folder named `codium-portable-data` instead of `code-portable-data`.
|
||||||
|
|
||||||
|
## <a id="file-manager"></a>How do I fix the default file manager (Linux)?
|
||||||
|
|
||||||
|
In some case, VSCodium becomes the file manager used to open directories (instead of apps like Dolphin or Nautilus).<br />
|
||||||
|
It's due to that no application was defined as the default file manager and so the system is using the latest capable application.
|
||||||
|
|
||||||
|
To set the default app, create the file `~/.config/mimeapps.list` with the content like:
|
||||||
|
```
|
||||||
|
[Default Applications]
|
||||||
|
inode/directory=org.gnome.Nautilus.desktop;
|
||||||
|
```
|
||||||
|
|
||||||
|
You can find your regular file manager with the command:
|
||||||
|
```
|
||||||
|
> grep directory /usr/share/applications/mimeinfo.cache
|
||||||
|
inode/directory=codium.desktop;org.gnome.Nautilus.desktop;
|
||||||
|
```
|
||||||
|
|
||||||
## <a id="press-and-hold"></a>How do I press and hold a key and have it repeat in VSCodium (Mac)?
|
## <a id="press-and-hold"></a>How do I press and hold a key and have it repeat in VSCodium (Mac)?
|
||||||
|
|
||||||
This is a common question for Visual Studio Code and the procedure is slightly different in VSCodium because the `defaults` path is different.
|
This is a common question for Visual Studio Code and the procedure is slightly different in VSCodium because the `defaults` path is different.
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<div id="badges" align="center">
|
<div id="badges" align="center">
|
||||||
|
|
||||||
[](https://github.com/vscodium/vscodium/releases)
|
[](https://github.com/vscodium/vscodium/releases)
|
||||||
[](https://dev.azure.com/vscodium/VSCodium/_build?definitionId=1)
|
[](https://dev.azure.com/vscodium/VSCodium/_build?definitionId=1)
|
||||||
[](https://github.com/VSCodium/vscodium/blob/master/LICENSE)
|
[](https://github.com/VSCodium/vscodium/blob/master/LICENSE)
|
||||||
[](https://gitter.im/VSCodium/Lobby)
|
[](https://gitter.im/VSCodium/Lobby)
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
- [Install with Package Manager](#install-with-package-manager)
|
- [Install with Package Manager](#install-with-package-manager)
|
||||||
- [Install on Arch Linux](#install-on-arch-linux)
|
- [Install on Arch Linux](#install-on-arch-linux)
|
||||||
- [Flatpak Option](#flatpak)
|
- [Flatpak Option](#flatpak)
|
||||||
|
- [Build](#build)
|
||||||
- [Why Does This Exist](#why)
|
- [Why Does This Exist](#why)
|
||||||
- [More Info](#more-info)
|
- [More Info](#more-info)
|
||||||
- [Supported Platforms](#supported-platforms)
|
- [Supported Platforms](#supported-platforms)
|
||||||
@@ -65,14 +66,14 @@ scoop install vscodium
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### <a id="install-with-snap"></a>Install with snap (GNU/Linux)
|
#### <a id="install-with-snap"></a>Install with snap (GNU/Linux)
|
||||||
VSCodium is available in the [Snap Store](https://snapcraft.io/) as [Codium](https://snapcraft.io/codium), published by the [Snapcrafters](https://github.com/snapcrafters/codium) community.
|
VSCodium is available in the [Snap Store](https://snapcraft.io/) as [Codium](https://snapcraft.io/codium), thanks to the help of the [Snapcrafters](https://github.com/snapcrafters/codium) community.
|
||||||
If your GNU/Linux distribution has support for [snaps](https://snapcraft.io/docs/installing-snapd):
|
If your GNU/Linux distribution has support for [snaps](https://snapcraft.io/docs/installing-snapd):
|
||||||
```bash
|
```bash
|
||||||
snap install codium --classic
|
snap install codium --classic
|
||||||
```
|
```
|
||||||
|
|
||||||
#### <a id="install-with-package-manager"></a>Install with Package Manager (GNU/Linux)
|
#### <a id="install-with-package-manager"></a>Install with Package Manager (GNU/Linux)
|
||||||
You can always install using the downloads (deb, rpm, tar) on the [releases page](https://github.com/VSCodium/vscodium/releases), but you can also install using your favorite package manager and get automatic updates. [@paulcarroty](https://github.com/paulcarroty) has set up a repository with instructions [here](https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo). Any issues installing VSCodium using your package manager should be directed to that repository's issue tracker.
|
You can always install using the downloads (deb, rpm, tar) on the [releases page](https://github.com/VSCodium/vscodium/releases), but you can also install using your favorite package manager and get automatic updates. [@paulcarroty](https://github.com/paulcarroty) has set up a repository with instructions [here](https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo). Any issues installing VSCodium using your package manager should be directed to that repository's issue tracker.
|
||||||
|
|
||||||
#### <a id="install-on-arch-linux"></a>Install on Arch Linux
|
#### <a id="install-on-arch-linux"></a>Install on Arch Linux
|
||||||
VSCodium is available in [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository) as package [vscodium-bin](https://aur.archlinux.org/packages/vscodium-bin/), maintained by [@binex-dsk](https://github.com/binex-dsk). An alternative package [vscodium-git](https://aur.archlinux.org/packages/vscodium-git/), maintained by [@cedricroijakkers](https://github.com/cedricroijakkers), is also available should you wish to compile from source yourself.
|
VSCodium is available in [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository) as package [vscodium-bin](https://aur.archlinux.org/packages/vscodium-bin/), maintained by [@binex-dsk](https://github.com/binex-dsk). An alternative package [vscodium-git](https://aur.archlinux.org/packages/vscodium-git/), maintained by [@cedricroijakkers](https://github.com/cedricroijakkers), is also available should you wish to compile from source yourself.
|
||||||
@@ -85,24 +86,29 @@ flatpak install flathub com.vscodium.codium
|
|||||||
flatpak run com.vscodium.codium
|
flatpak run com.vscodium.codium
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## <a id="build"></a>Build
|
||||||
|
Build instructions can be found [here](https://github.com/VSCodium/vscodium/blob/master/docs/build.md)
|
||||||
|
|
||||||
## <a id="why"></a>Why Does This Exist
|
## <a id="why"></a>Why Does This Exist
|
||||||
This repository contains build files to generate free release binaries of Microsoft's VS Code. When we speak of "free software", we're talking about freedom, not price.
|
This repository contains build files to generate free release binaries of Microsoft's VS Code. When we speak of "free software", we're talking about freedom, not price.
|
||||||
|
|
||||||
Microsoft's releases of Visual Studio Code are licensed under [this not-FLOSS license](https://code.visualstudio.com/license) and contain telemetry/tracking. According to [this comment](https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005) from a Visual Studio Code maintainer:
|
Microsoft's releases of Visual Studio Code are licensed under [this not-FLOSS license](https://code.visualstudio.com/license) and contain telemetry/tracking. According to [this comment](https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005) from a Visual Studio Code maintainer:
|
||||||
|
|
||||||
> When we [Microsoft] build Visual Studio Code, we do exactly this. We clone the vscode repository, we lay down a customized product.json that has Microsoft specific functionality (telemetry, gallery, logo, etc.), and then produce a build that we release under our license.
|
> When we [Microsoft] build Visual Studio Code, we do exactly this. We clone the vscode repository, we lay down a customized product.json that has Microsoft specific functionality (telemetry, gallery, logo, etc.), and then produce a build that we release under our license.
|
||||||
>
|
>
|
||||||
> When you clone and build from the vscode repo, none of these endpoints are configured in the default product.json. Therefore, you generate a "clean" build, without the Microsoft customizations, which is by default licensed under the MIT license
|
> When you clone and build from the vscode repo, none of these endpoints are configured in the default product.json. Therefore, you generate a "clean" build, without the Microsoft customizations, which is by default licensed under the MIT license
|
||||||
|
|
||||||
This repo exists so that you don't have to download+build from source. The build scripts in this repo clone Microsoft's vscode repo, run the build commands, and upload the resulting binaries to [GitHub releases](https://github.com/VSCodium/vscodium/releases). __These binaries are licensed under the MIT license. Telemetry is disabled.__
|
This repo exists so that you don't have to download+build from source. The build scripts in this repo clone Microsoft's vscode repo, run the build commands, and upload the resulting binaries to [GitHub releases](https://github.com/VSCodium/vscodium/releases). __These binaries are licensed under the MIT license. Telemetry is disabled.__
|
||||||
|
|
||||||
If you want to build from source yourself, head over to [Microsoft's vscode repo](https://github.com/Microsoft/vscode) and follow their [instructions](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run). This repo exists to make it easier to get the latest version of MIT-licensed VS Code.
|
If you want to build from source yourself, head over to [Microsoft's vscode repo](https://github.com/Microsoft/vscode) and follow their [instructions](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run). This repo exists to make it easier to get the latest version of MIT-licensed VS Code.
|
||||||
|
|
||||||
Microsoft's build process (which we are running to build the binaries) does download additional files. This was brought up in [Microsoft/vscode#49159](https://github.com/Microsoft/vscode/issues/49159) and [Microsoft/vscode#45978](https://github.com/Microsoft/vscode/issues/45978). These are the packages downloaded during build:
|
Microsoft's build process (which we are running to build the binaries) does download additional files. This was brought up in [Microsoft/vscode#141340](https://github.com/Microsoft/vscode/issues/141340) and [Microsoft/vscode#45978](https://github.com/Microsoft/vscode/issues/45978). These are the packages downloaded during build:
|
||||||
|
|
||||||
- Extensions from the Microsoft Marketplace:
|
- Extensions from the Microsoft Marketplace:
|
||||||
- [ms-vscode.node-debug2](https://marketplace.visualstudio.com/items?itemName=ms-vscode.node-debug2)
|
- [ms-vscode.references-view](https://marketplace.visualstudio.com/items?itemName=ms-vscode.references-view)
|
||||||
- [ms-vscode.node-debug](https://marketplace.visualstudio.com/items?itemName=ms-vscode.node-debug)
|
- [ms-vscode.js-debug-companion](https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-debug-companion)
|
||||||
|
- [ms-vscode.js-debug](https://marketplace.visualstudio.com/items?itemName=ms-vscode.js-debug)
|
||||||
|
- [ms-vscode.vscode-js-profile-table](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-js-profile-table)
|
||||||
- From [Electron releases](https://github.com/electron/electron/releases) (using [gulp-atom-electron](https://github.com/joaomoreno/gulp-atom-electron))
|
- From [Electron releases](https://github.com/electron/electron/releases) (using [gulp-atom-electron](https://github.com/joaomoreno/gulp-atom-electron))
|
||||||
- electron
|
- electron
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
@@ -120,10 +126,10 @@ Please note that some Visual Studio Code extensions have licenses that restrict
|
|||||||
### How are the VSCodium binaries built?
|
### How are the VSCodium binaries built?
|
||||||
If you would like to see the commands we run to build `vscode` into VSCodium binaries, have a look at the workflow files in `.github/workflows` for Windows, GNU/Linux and macOS. These build files call all the other scripts in the repo. If you find something that doesn't make sense, feel free to ask about it [on Gitter](https://gitter.im/VSCodium/Lobby).
|
If you would like to see the commands we run to build `vscode` into VSCodium binaries, have a look at the workflow files in `.github/workflows` for Windows, GNU/Linux and macOS. These build files call all the other scripts in the repo. If you find something that doesn't make sense, feel free to ask about it [on Gitter](https://gitter.im/VSCodium/Lobby).
|
||||||
|
|
||||||
The builds are run every day, but exit early if there isn't a new release from Microsoft.
|
The builds are run every day, but exit early if there isn't a new release from Microsoft.
|
||||||
|
|
||||||
## <a id="supported-platforms"></a>Supported Platforms
|
## <a id="supported-platforms"></a>Supported Platforms
|
||||||
The minimal version is limitted by the core component Electron, you may want to check its [supported platform list](https://www.electronjs.org/docs/tutorial/support#supported-platforms).
|
The minimal version is limited by the core component Electron, you may want to check its [supported platform list](https://www.electronjs.org/docs/tutorial/support#supported-platforms).
|
||||||
- [x] macOS (`zip`, `dmg`) OS X 10.10 or newer x64
|
- [x] macOS (`zip`, `dmg`) OS X 10.10 or newer x64
|
||||||
- [x] macOS (`zip`, `dmg`) macOS 11.0 or newer arm64 via x64 emulation, see [status issue](https://github.com/VSCodium/vscodium/issues/597)
|
- [x] macOS (`zip`, `dmg`) macOS 11.0 or newer arm64 via x64 emulation, see [status issue](https://github.com/VSCodium/vscodium/issues/597)
|
||||||
- [x] GNU/Linux x64 (`deb`, `rpm`, `AppImage`, `tar.gz`)
|
- [x] GNU/Linux x64 (`deb`, `rpm`, `AppImage`, `tar.gz`)
|
||||||
@@ -133,7 +139,7 @@ The minimal version is limitted by the core component Electron, you may want to
|
|||||||
- [x] Windows 7 or newer x64
|
- [x] Windows 7 or newer x64
|
||||||
- [x] Windows 7 or newer x86
|
- [x] Windows 7 or newer x86
|
||||||
- [x] Windows 10 arm64
|
- [x] Windows 10 arm64
|
||||||
|
|
||||||
## <a id="donate"></a>Donate
|
## <a id="donate"></a>Donate
|
||||||
If you would like to support the development of VSCodium, feel free to send BTC to `3PgjE95yzBDTrSPxPiqoxSgZFuKPPAix1N`.
|
If you would like to support the development of VSCodium, feel free to send BTC to `3PgjE95yzBDTrSPxPiqoxSgZFuKPPAix1N`.
|
||||||
|
|
||||||
|
|||||||
53
build.sh
53
build.sh
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [[ "$SHOULD_BUILD" == "yes" ]]; then
|
if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||||
npm config set scripts-prepend-node-path true
|
npm config set scripts-prepend-node-path true
|
||||||
|
|
||||||
echo "MS_COMMIT: ${MS_COMMIT}"
|
echo "MS_COMMIT: ${MS_COMMIT}"
|
||||||
@@ -19,29 +19,50 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
|
|||||||
yarn gulp compile-extensions-build
|
yarn gulp compile-extensions-build
|
||||||
yarn gulp minify-vscode
|
yarn gulp minify-vscode
|
||||||
|
|
||||||
if [[ "$OS_NAME" == "osx" ]]; then
|
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||||
yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
|
yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
|
||||||
elif [[ "$OS_NAME" == "windows" ]]; then
|
elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||||
. ../build/windows/rtf/make.sh
|
. ../build/windows/rtf/make.sh
|
||||||
|
|
||||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
|
yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
|
||||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-code-helper"
|
|
||||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-inno-updater"
|
yarn gulp "vscode-win32-${VSCODE_ARCH}-inno-updater"
|
||||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-archive"
|
|
||||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-system-setup"
|
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-user-setup"
|
yarn gulp "vscode-win32-${VSCODE_ARCH}-archive"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
|
||||||
|
yarn gulp "vscode-win32-${VSCODE_ARCH}-system-setup"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then
|
||||||
|
yarn gulp "vscode-win32-${VSCODE_ARCH}-user-setup"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
||||||
. ../build/windows/msi/build.sh
|
if [[ "${SHOULD_BUILD_MSI}" != "no" ]]; then
|
||||||
. ../build/windows/msi/build-updates-disabled.sh
|
. ../build/windows/msi/build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then
|
||||||
|
. ../build/windows/msi/build-updates-disabled.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else # linux
|
else # linux
|
||||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
|
yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
|
||||||
if [[ "$SKIP_LINUX_PACKAGES" != "True" ]]; then
|
|
||||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-deb"
|
if [[ "${SKIP_LINUX_PACKAGES}" != "True" ]]; then
|
||||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-rpm"
|
if [[ "${SHOULD_BUILD_DEB}" != "no" || "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
|
||||||
|
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-deb"
|
||||||
. ../build/linux/appimage/build.sh
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_RPM}" != "no" ]]; then
|
||||||
|
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-rpm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
|
||||||
|
. ../build/linux/appimage/build.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ if [[ "$VSCODE_ARCH" == "x64" ]]; then
|
|||||||
sed -i 's/grep docker/# grep docker/' pkg2appimage.AppDir/usr/share/pkg2appimage/functions.sh
|
sed -i 's/grep docker/# grep docker/' pkg2appimage.AppDir/usr/share/pkg2appimage/functions.sh
|
||||||
|
|
||||||
bash -ex pkg2appimage.AppDir/AppRun recipe.yml
|
bash -ex pkg2appimage.AppDir/AppRun recipe.yml
|
||||||
|
|
||||||
rm -f pkg2appimage-*.AppImage
|
rm -f pkg2appimage-*.AppImage
|
||||||
rm -rf pkg2appimage.AppDir
|
rm -rf pkg2appimage.AppDir
|
||||||
rm -rf VSCodium
|
rm -rf VSCodium
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "${CALLER_DIR}"
|
cd "${CALLER_DIR}"
|
||||||
|
|||||||
@@ -30,11 +30,13 @@ script:
|
|||||||
- /usr/bin/convert vscodium.png -resize 48x48 usr/share/icons/hicolor/48x48/apps/vscodium.png
|
- /usr/bin/convert vscodium.png -resize 48x48 usr/share/icons/hicolor/48x48/apps/vscodium.png
|
||||||
- /usr/bin/convert vscodium.png -resize 32x32 usr/share/icons/hicolor/32x32/apps/vscodium.png
|
- /usr/bin/convert vscodium.png -resize 32x32 usr/share/icons/hicolor/32x32/apps/vscodium.png
|
||||||
- ( cd usr/bin/ ; ln -s ../share/codium/codium . )
|
- ( cd usr/bin/ ; ln -s ../share/codium/codium . )
|
||||||
|
- rm -rf usr/lib/x86_64-linux-gnu
|
||||||
|
- rm -f lib/x86_64-linux-gnu/libglib*
|
||||||
- cat > AppRun <<\EOF
|
- cat > AppRun <<\EOF
|
||||||
- #!/bin/sh
|
- #!/bin/sh
|
||||||
- HERE="$(dirname "$(readlink -f "${0}")")"
|
- HERE="$(dirname "$(readlink -f "${0}")")"
|
||||||
- export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/sbin/:"${HERE}"/usr/games/:"${HERE}"/bin/:"${HERE}"/sbin/:"${PATH}"
|
- export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/sbin/:"${HERE}"/usr/games/:"${HERE}"/bin/:"${HERE}"/sbin/:"${PATH}"
|
||||||
- export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}"
|
- export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}"
|
||||||
- export XDG_DATA_DIRS="${HERE}"/usr/share/:"${XDG_DATA_DIRS}"
|
- export XDG_DATA_DIRS="${HERE}"/usr/share/:"${XDG_DATA_DIRS}"
|
||||||
- export PERLLIB="${HERE}"/usr/share/perl5/:"${HERE}"/usr/lib/perl5/:"${PERLLIB}"
|
- export PERLLIB="${HERE}"/usr/share/perl5/:"${HERE}"/usr/lib/perl5/:"${PERLLIB}"
|
||||||
- export GSETTINGS_SCHEMA_DIR="${HERE}"/usr/share/glib-2.0/schemas/:"${GSETTINGS_SCHEMA_DIR}"
|
- export GSETTINGS_SCHEMA_DIR="${HERE}"/usr/share/glib-2.0/schemas/:"${GSETTINGS_SCHEMA_DIR}"
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:c3eac997fba9d3d5596c503a826fe5d54c87b1cf899a790b6d077e4d196bd5e9
|
|
||||||
size 373978
|
|
||||||
@@ -1,15 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../../vscode
|
||||||
|
|
||||||
CALLER_DIR=$( pwd )
|
input=LICENSE.txt
|
||||||
|
target=LICENSE.rtf
|
||||||
|
|
||||||
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
cat - >$target <<_EOF
|
||||||
|
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Consolas;}}
|
||||||
|
\viewkind4\uc1\pard\lang1033\f0\fs22
|
||||||
|
|
||||||
7z x -y TXT2RTF.zip
|
_EOF
|
||||||
|
|
||||||
LICENSE=$( powershell.exe -Command "[System.IO.Path]::GetFullPath( '../../../vscode/LICENSE.txt' )" )
|
sed -zE -e 's/([A-Za-z,])\r?\n([A-Za-z])/\1 \2/g' -e 's/\r?\n\r?\n/\\par\n\n/g' -e 's/(\\par\n)/\\line\1/g' -e 's/\s*(Copyright)/\\line\n\1/g' -e 's/(\\par)\\line/\1\n/g' $input >> $target
|
||||||
|
|
||||||
"./TXT to RTF Converter.exe" "${LICENSE}"
|
|
||||||
|
|
||||||
cd "${CALLER_DIR}"
|
cat - >>$target <<_EOF
|
||||||
|
\par
|
||||||
|
}
|
||||||
|
_EOF
|
||||||
|
|||||||
366
check_tags.sh
366
check_tags.sh
@@ -2,143 +2,259 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||||
|
echo "Will not build because no GITHUB_TOKEN defined"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
REPOSITORY="${GITHUB_REPOSITORY:-"VSCodium/vscodium"}"
|
REPOSITORY="${GITHUB_REPOSITORY:-"VSCodium/vscodium"}"
|
||||||
GITHUB_RESPONSE=$( curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/$REPOSITORY/releases/tags/$MS_TAG)
|
GITHUB_RESPONSE=$( curl -s -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/${REPOSITORY}/releases/tags/${MS_TAG})
|
||||||
VSCODIUM_ASSETS=$( echo $GITHUB_RESPONSE | jq -c '.assets | map(.name)?' )
|
VSCODIUM_ASSETS=$( echo "${GITHUB_RESPONSE}" | jq -c '.assets | map(.name)?' )
|
||||||
|
|
||||||
contains() {
|
contains() {
|
||||||
# add " to match the end of a string so any hashs won't be matched by mistake
|
# add " to match the end of a string so any hashs won't be matched by mistake
|
||||||
echo $VSCODIUM_ASSETS | grep "$1\""
|
echo "${VSCODIUM_ASSETS}" | grep "$1\""
|
||||||
}
|
}
|
||||||
|
|
||||||
# if we just don't have the github token, get out fast
|
if [ "${VSCODIUM_ASSETS}" != "null" ]; then
|
||||||
if [ "$GITHUB_TOKEN" != "" ]; then
|
# macos
|
||||||
if [ "$VSCODIUM_ASSETS" != "null" ]; then
|
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||||
# macos
|
if [[ -z $( contains "darwin-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
|
||||||
if [[ "$OS_NAME" == "osx" ]]; then
|
echo "Building on MacOS because we have no ZIP"
|
||||||
if [[ -z $( contains "darwin-$VSCODE_ARCH-$MS_TAG.zip" ) ]]; then
|
export SHOULD_BUILD="yes"
|
||||||
echo "Building on Mac because we have no ZIP"
|
else
|
||||||
|
export SHOULD_BUILD_ZIP="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains ".${VSCODE_ARCH}.${MS_TAG}.dmg" ) ]]; then
|
||||||
|
echo "Building on MacOS because we have no DMG"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_DMG="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
|
echo "Already have all the MacOS builds"
|
||||||
|
fi
|
||||||
|
elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||||
|
|
||||||
|
# windows-arm64
|
||||||
|
if [[ ${VSCODE_ARCH} == "arm64" ]]; then
|
||||||
|
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
|
||||||
|
echo "Building on Windows arm64 because we have no system setup"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
fi
|
|
||||||
elif [[ "$OS_NAME" == "windows" ]]; then
|
|
||||||
# windows-arm64
|
|
||||||
if [[ $VSCODE_ARCH == "arm64" ]]; then
|
|
||||||
if [[ -z $( contains "VSCodiumSetup-$VSCODE_ARCH-$MS_TAG.exe" ) ]]; then
|
|
||||||
echo "Building on Windows arm64 because we have no system setup"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "UserSetup-$VSCODE_ARCH-$MS_TAG.exe" ) ]]; then
|
|
||||||
echo "Building on Windows arm64 because we have no user setup"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "win32-$VSCODE_ARCH-$MS_TAG.zip" ) ]]; then
|
|
||||||
echo "Building on Windows arm64 because we have no zip"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ "$SHOULD_BUILD" != "yes" ]]; then
|
|
||||||
echo "Already have all the Windows arm64 builds"
|
|
||||||
fi
|
|
||||||
# windows-ia32
|
|
||||||
elif [[ $VSCODE_ARCH == "ia32" ]]; then
|
|
||||||
if [[ -z $( contains "VSCodiumSetup-$VSCODE_ARCH-$MS_TAG.exe" ) ]]; then
|
|
||||||
echo "Building on Windows ia32 because we have no system setup"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "UserSetup-$VSCODE_ARCH-$MS_TAG.exe" ) ]]; then
|
|
||||||
echo "Building on Windows ia32 because we have no user setup"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "win32-$VSCODE_ARCH-$MS_TAG.zip" ) ]]; then
|
|
||||||
echo "Building on Windows ia32 because we have no zip"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "VSCodium-$VSCODE_ARCH-$MS_TAG.msi" ) ]]; then
|
|
||||||
echo "Building on Windows ia32 because we have no msi"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "VSCodium-$VSCODE_ARCH-updates-disabled-$MS_TAG.msi" ) ]]; then
|
|
||||||
echo "Building on Windows ia32 because we have no updates-disabled msi"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ "$SHOULD_BUILD" != "yes" ]]; then
|
|
||||||
echo "Already have all the Windows ia32 builds"
|
|
||||||
fi
|
|
||||||
# windows-x64
|
|
||||||
else
|
else
|
||||||
if [[ -z $( contains "VSCodiumSetup-$VSCODE_ARCH-$MS_TAG.exe" ) ]]; then
|
export SHOULD_BUILD_EXE_SYS="no"
|
||||||
echo "Building on Windows x64 because we have no system setup"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "UserSetup-$VSCODE_ARCH-$MS_TAG.exe" ) ]]; then
|
|
||||||
echo "Building on Windows x64 because we have no user setup"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "win32-$VSCODE_ARCH-$MS_TAG.zip" ) ]]; then
|
|
||||||
echo "Building on Windows x64 because we have no zip"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "VSCodium-$VSCODE_ARCH-$MS_TAG.msi" ) ]]; then
|
|
||||||
echo "Building on Windows x64 because we have no msi"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "VSCodium-$VSCODE_ARCH-updates-disabled-$MS_TAG.msi" ) ]]; then
|
|
||||||
echo "Building on Windows x64 because we have no updates-disabled msi"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ "$SHOULD_BUILD" != "yes" ]]; then
|
|
||||||
echo "Already have all the Windows x64 builds"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
elif [[ "$OS_NAME" == "linux" ]]; then
|
|
||||||
# linux-arm64
|
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
|
||||||
if [[ $VSCODE_ARCH == "arm64" ]]; then
|
echo "Building on Windows arm64 because we have no user setup"
|
||||||
if [[ -z $( contains "arm64.deb" ) ]]; then
|
export SHOULD_BUILD="yes"
|
||||||
echo "Building on Linux arm64 because we have no DEB"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "arm64-$MS_TAG.tar.gz" ) ]]; then
|
|
||||||
echo "Building on Linux arm64 because we have no TAR"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ "$SHOULD_BUILD" != "yes" ]]; then
|
|
||||||
echo "Already have all the Linux arm64 builds"
|
|
||||||
fi
|
|
||||||
# linux-armhf
|
|
||||||
elif [[ $VSCODE_ARCH == "armhf" ]]; then
|
|
||||||
if [[ -z $( contains "armhf.deb" ) ]]; then
|
|
||||||
echo "Building on Linux arm because we have no DEB"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ -z $( contains "armhf-${MS_TAG}.tar.gz" ) ]]; then
|
|
||||||
echo "Building on Linux arm because we have no TAR"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
|
||||||
if [[ "$SHOULD_BUILD" != "yes" ]]; then
|
|
||||||
echo "Already have all the Linux arm builds"
|
|
||||||
fi
|
|
||||||
# linux-x64
|
|
||||||
else
|
else
|
||||||
if [[ -z $( contains "x86_64.rpm" ) ]]; then
|
export SHOULD_BUILD_EXE_USR="no"
|
||||||
echo "Building on Linux x64 because we have no RPM"
|
fi
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
|
||||||
if [[ -z $( contains "amd64.deb" ) ]]; then
|
echo "Building on Windows arm64 because we have no zip"
|
||||||
echo "Building on Linux x64 because we have no DEB"
|
export SHOULD_BUILD="yes"
|
||||||
export SHOULD_BUILD="yes"
|
else
|
||||||
fi
|
export SHOULD_BUILD_ZIP="no"
|
||||||
if [[ -z $( contains "x64-$MS_TAG.tar.gz" ) ]]; then
|
fi
|
||||||
echo "Building on Linux x64 because we have no TAR"
|
|
||||||
export SHOULD_BUILD="yes"
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
fi
|
echo "Already have all the Windows arm64 builds"
|
||||||
if [[ "$SHOULD_BUILD" != "yes" ]]; then
|
fi
|
||||||
echo "Already have all the Linux x64 builds"
|
|
||||||
fi
|
# windows-ia32
|
||||||
|
elif [[ ${VSCODE_ARCH} == "ia32" ]]; then
|
||||||
|
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
|
||||||
|
echo "Building on Windows ia32 because we have no system setup"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_EXE_SYS="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
|
||||||
|
echo "Building on Windows ia32 because we have no user setup"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_EXE_USR="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
|
||||||
|
echo "Building on Windows ia32 because we have no zip"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_ZIP="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi" ) ]]; then
|
||||||
|
echo "Building on Windows ia32 because we have no msi"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_MSI="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi" ) ]]; then
|
||||||
|
echo "Building on Windows ia32 because we have no updates-disabled msi"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_MSI_NOUP="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
|
echo "Already have all the Windows ia32 builds"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# windows-x64
|
||||||
|
else
|
||||||
|
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
|
||||||
|
echo "Building on Windows x64 because we have no system setup"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_EXE_SYS="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
|
||||||
|
echo "Building on Windows x64 because we have no user setup"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_EXE_USR="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
|
||||||
|
echo "Building on Windows x64 because we have no zip"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_ZIP="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi" ) ]]; then
|
||||||
|
echo "Building on Windows x64 because we have no msi"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_MSI="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi" ) ]]; then
|
||||||
|
echo "Building on Windows x64 because we have no updates-disabled msi"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_MSI_NOUP="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
|
echo "Already have all the Windows x64 builds"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [[ "${OS_NAME}" == "linux" ]]; then
|
||||||
|
|
||||||
|
# linux-arm64
|
||||||
|
if [[ ${VSCODE_ARCH} == "arm64" ]]; then
|
||||||
|
if [[ -z $( contains "arm64.deb" ) ]]; then
|
||||||
|
echo "Building on Linux arm64 because we have no DEB"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_DEB="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "aarch64.rpm" ) ]]; then
|
||||||
|
echo "Building on Linux arm64 because we have no RPM"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_RPM="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "arm64-${MS_TAG}.tar.gz" ) ]]; then
|
||||||
|
echo "Building on Linux arm64 because we have no TAR"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_TAR="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SHOULD_BUILD_APPIMAGE="no"
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
|
echo "Already have all the Linux arm64 builds"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# linux-armhf
|
||||||
|
elif [[ ${VSCODE_ARCH} == "armhf" ]]; then
|
||||||
|
if [[ -z $( contains "armhf.deb" ) ]]; then
|
||||||
|
echo "Building on Linux arm because we have no DEB"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_DEB="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "armv7hl.rpm" ) ]]; then
|
||||||
|
echo "Building on Linux arm because we have no RPM"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_RPM="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "armhf-${MS_TAG}.tar.gz" ) ]]; then
|
||||||
|
echo "Building on Linux arm because we have no TAR"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_TAR="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SHOULD_BUILD_APPIMAGE="no"
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
|
echo "Already have all the Linux arm builds"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# linux-x64
|
||||||
|
else
|
||||||
|
if [[ -z $( contains "amd64.deb" ) ]]; then
|
||||||
|
echo "Building on Linux x64 because we have no DEB"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_DEB="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "x86_64.rpm" ) ]]; then
|
||||||
|
echo "Building on Linux x64 because we have no RPM"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_RPM="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "x64-${MS_TAG}.tar.gz" ) ]]; then
|
||||||
|
echo "Building on Linux x64 because we have no TAR"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_TAR="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $( contains "x86_64.AppImage" ) ]]; then
|
||||||
|
echo "Building on Linux x64 because we have no AppImage"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
else
|
||||||
|
export SHOULD_BUILD_APPIMAGE="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
|
echo "Already have all the Linux x64 builds"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "Release assets do not exist at all, continuing build"
|
|
||||||
export SHOULD_BUILD="yes"
|
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Release assets do not exist at all, continuing build"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "SHOULD_BUILD=$SHOULD_BUILD" >> $GITHUB_ENV
|
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_APPIMAGE=${SHOULD_BUILD_APPIMAGE}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_DEB=${SHOULD_BUILD_DEB}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_DMG=${SHOULD_BUILD_DMG}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_EXE_SYS=${SHOULD_BUILD_EXE_SYS}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_EXE_USR=${SHOULD_BUILD_EXE_USR}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_MSI=${SHOULD_BUILD_MSI}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_MSI_NOUP=${SHOULD_BUILD_MSI_NOUP}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_RPM=${SHOULD_BUILD_RPM}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_TAR=${SHOULD_BUILD_TAR}" >> "${GITHUB_ENV}"
|
||||||
|
echo "SHOULD_BUILD_ZIP=${SHOULD_BUILD_ZIP}" >> "${GITHUB_ENV}"
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
|
|
||||||
### <a id="dependencies-linux"></a>Linux
|
### <a id="dependencies-linux"></a>Linux
|
||||||
|
|
||||||
|
- GCC
|
||||||
|
- make
|
||||||
|
- pkg-config
|
||||||
- libx11-dev
|
- libx11-dev
|
||||||
- libxkbfile-dev
|
- libxkbfile-dev
|
||||||
- libsecret-1-dev
|
- libsecret-1-dev
|
||||||
@@ -25,6 +28,9 @@
|
|||||||
- rpm
|
- rpm
|
||||||
- rpmbuild
|
- rpmbuild
|
||||||
- dpkg
|
- dpkg
|
||||||
|
- python3
|
||||||
|
- libsecret-1-dev
|
||||||
|
- imagemagick (for AppImage)
|
||||||
|
|
||||||
### <a id="dependencies-macos"></a>MacOS
|
### <a id="dependencies-macos"></a>MacOS
|
||||||
|
|
||||||
@@ -34,6 +40,8 @@
|
|||||||
- sed
|
- sed
|
||||||
- 7z
|
- 7z
|
||||||
- [WiX Toolset](http://wixtoolset.org/releases/)
|
- [WiX Toolset](http://wixtoolset.org/releases/)
|
||||||
|
- python2
|
||||||
|
- 'Tools for Native Modules' from official Node.js installer
|
||||||
|
|
||||||
## <a id="build-scripts"></a>Build Scripts
|
## <a id="build-scripts"></a>Build Scripts
|
||||||
|
|
||||||
@@ -70,4 +78,4 @@ export OS_NAME=linux
|
|||||||
export VSCODE_ARCH=x64
|
export VSCODE_ARCH=x64
|
||||||
|
|
||||||
./build.sh
|
./build.sh
|
||||||
```
|
```
|
||||||
|
|||||||
40
get_repo.sh
40
get_repo.sh
@@ -8,26 +8,26 @@ git remote add origin https://github.com/Microsoft/vscode.git
|
|||||||
|
|
||||||
# figure out latest tag by calling MS update API
|
# figure out latest tag by calling MS update API
|
||||||
if [ "$INSIDER" == "1" ]; then
|
if [ "$INSIDER" == "1" ]; then
|
||||||
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol)
|
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol)
|
||||||
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
|
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
|
||||||
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
|
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
|
||||||
elif [[ -z "${MS_TAG}" ]]; then
|
elif [[ -z "${MS_TAG}" ]]; then
|
||||||
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
|
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
|
||||||
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
|
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
|
||||||
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
|
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
|
||||||
else
|
else
|
||||||
reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
|
reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
|
||||||
|
|
||||||
if [[ -z "${reference}" ]]; then
|
if [[ -z "${reference}" ]]; then
|
||||||
echo "The following tag can't be found: ${MS_TAG}"
|
echo "The following tag can't be found: ${MS_TAG}"
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ "${reference}" =~ ^([[:alnum:]]+)[[:space:]]+refs\/tags\/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
|
elif [[ "${reference}" =~ ^([[:alnum:]]+)[[:space:]]+refs\/tags\/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
|
||||||
export MS_COMMIT="${BASH_REMATCH[1]}"
|
export MS_COMMIT="${BASH_REMATCH[1]}"
|
||||||
export MS_TAG="${BASH_REMATCH[2]}"
|
export MS_TAG="${BASH_REMATCH[2]}"
|
||||||
else
|
else
|
||||||
echo "The following reference can't be parsed: ${reference}"
|
echo "The following reference can't be parsed: ${reference}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}"
|
echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}"
|
||||||
@@ -39,6 +39,6 @@ cd ..
|
|||||||
|
|
||||||
# for GH actions
|
# for GH actions
|
||||||
if [[ $GITHUB_ENV ]]; then
|
if [[ $GITHUB_ENV ]]; then
|
||||||
echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV
|
echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV
|
||||||
echo "MS_COMMIT=$MS_COMMIT" >> $GITHUB_ENV
|
echo "MS_COMMIT=$MS_COMMIT" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|||||||
15
install_gh.sh
Executable file
15
install_gh.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
GH_ARCH="amd64"
|
||||||
|
|
||||||
|
VERSION=`curl "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-`
|
||||||
|
|
||||||
|
curl -sSL "https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_${GH_ARCH}.tar.gz" -o "gh_${VERSION}_linux_${GH_ARCH}.tar.gz"
|
||||||
|
|
||||||
|
tar xf "gh_${VERSION}_linux_${GH_ARCH}.tar.gz"
|
||||||
|
|
||||||
|
cp "gh_${VERSION}_linux_${GH_ARCH}/bin/gh" /usr/local/bin/
|
||||||
|
|
||||||
|
gh --version
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
||||||
index 6d3a369..57009d4 100644
|
index 2f5a931..ac3d7e6 100644
|
||||||
--- a/build/gulpfile.vscode.js
|
--- a/build/gulpfile.vscode.js
|
||||||
+++ b/build/gulpfile.vscode.js
|
+++ b/build/gulpfile.vscode.js
|
||||||
@@ -276,7 +276,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
@@ -290,7 +290,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||||
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
|
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
|
||||||
} else if (platform === 'darwin') {
|
} else if (platform === 'darwin') {
|
||||||
const shortcut = gulp.src('resources/darwin/bin/code.sh')
|
const shortcut = gulp.src('resources/darwin/bin/code.sh')
|
||||||
@@ -11,29 +11,20 @@ index 6d3a369..57009d4 100644
|
|||||||
|
|
||||||
all = es.merge(all, shortcut);
|
all = es.merge(all, shortcut);
|
||||||
}
|
}
|
||||||
@@ -483,7 +483,7 @@ const generateVSCodeConfigurationTask = task.define('generate-vscode-configurati
|
|
||||||
const arch = process.env['VSCODE_ARCH'];
|
|
||||||
const appRoot = path.join(buildDir, `VSCode-darwin-${arch}`);
|
|
||||||
const appName = process.env.VSCODE_QUALITY === 'insider' ? 'Visual\\ Studio\\ Code\\ -\\ Insiders.app' : 'Visual\\ Studio\\ Code.app';
|
|
||||||
- const appPath = path.join(appRoot, appName, 'Contents', 'Resources', 'app', 'bin', 'code');
|
|
||||||
+ const appPath = path.join(appRoot, appName, 'Contents', 'Resources', 'app', 'bin', product.applicationName);
|
|
||||||
const codeProc = cp.exec(
|
|
||||||
`${appPath} --export-default-configuration='${allConfigDetailsPath}' --wait --user-data-dir='${userDataDir}' --extensions-dir='${extensionsDir}'`,
|
|
||||||
(err, stdout, stderr) => {
|
|
||||||
diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
index 692db1d..cd173bc 100644
|
index 3bd0c57..d921c60 100644
|
||||||
--- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
--- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
+++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
+++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
@@ -341,7 +341,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
@@ -353,7 +353,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getShellCommandLink(): Promise<{ readonly source: string, readonly target: string }> {
|
private async getShellCommandLink(): Promise<{ readonly source: string; readonly target: string }> {
|
||||||
- const target = resolve(this.environmentMainService.appRoot, 'bin', 'code');
|
- const target = resolve(this.environmentMainService.appRoot, 'bin', 'code');
|
||||||
+ const target = resolve(this.environmentMainService.appRoot, 'bin', this.productService.applicationName);
|
+ const target = resolve(this.environmentMainService.appRoot, 'bin', this.productService.applicationName);
|
||||||
const source = `/usr/local/bin/${this.productService.applicationName}`;
|
const source = `/usr/local/bin/${this.productService.applicationName}`;
|
||||||
|
|
||||||
// Ensure source exists
|
// Ensure source exists
|
||||||
@@ -551,7 +551,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
@@ -563,7 +563,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
||||||
|
|
||||||
// macOS
|
// macOS
|
||||||
if (this.environmentMainService.isBuilt) {
|
if (this.environmentMainService.isBuilt) {
|
||||||
@@ -42,4 +33,3 @@ index 692db1d..cd173bc 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
return join(this.environmentMainService.appRoot, 'scripts', 'code-cli.sh');
|
return join(this.environmentMainService.appRoot, 'scripts', 'code-cli.sh');
|
||||||
|
|
||||||
|
|||||||
13
patches/cleanup-archive.patch
Normal file
13
patches/cleanup-archive.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
|
||||||
|
index 1a73ae9..1b87189 100644
|
||||||
|
--- a/build/gulpfile.vscode.win32.js
|
||||||
|
+++ b/build/gulpfile.vscode.win32.js
|
||||||
|
@@ -126,7 +126,7 @@ defineWin32SetupTasks('arm64', 'user');
|
||||||
|
|
||||||
|
function archiveWin32Setup(arch) {
|
||||||
|
return cb => {
|
||||||
|
- const args = ['a', '-tzip', zipPath(arch), '-x!CodeSignSummary*.md', '.', '-r'];
|
||||||
|
+ const args = ['a', '-tzip', zipPath(arch), '-x!CodeSignSummary*.md', '-x!tools', '.', '-r'];
|
||||||
|
|
||||||
|
cp.spawn(_7z, args, { stdio: 'inherit', cwd: buildPath(arch) })
|
||||||
|
.on('error', cb)
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
|
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
|
||||||
index 78d6060..dfa9de2 100644
|
index 1edc76f..4c0bf98 100644
|
||||||
--- a/src/vs/base/common/product.ts
|
--- a/src/vs/base/common/product.ts
|
||||||
+++ b/src/vs/base/common/product.ts
|
+++ b/src/vs/base/common/product.ts
|
||||||
@@ -69,6 +69,7 @@ export interface IProductConfiguration {
|
@@ -69,6 +69,7 @@ export interface IProductConfiguration {
|
||||||
@@ -11,7 +11,7 @@ index 78d6060..dfa9de2 100644
|
|||||||
readonly resourceUrlTemplate: string;
|
readonly resourceUrlTemplate: string;
|
||||||
readonly controlUrl: string;
|
readonly controlUrl: string;
|
||||||
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
||||||
index 09dfc64..fec0cfa 100644
|
index e22b33e..98cec93 100644
|
||||||
--- a/src/vs/platform/product/common/product.ts
|
--- a/src/vs/platform/product/common/product.ts
|
||||||
+++ b/src/vs/platform/product/common/product.ts
|
+++ b/src/vs/platform/product/common/product.ts
|
||||||
@@ -4,11 +4,12 @@
|
@@ -4,11 +4,12 @@
|
||||||
@@ -26,11 +26,11 @@ index 09dfc64..fec0cfa 100644
|
|||||||
import { ISandboxConfiguration } from 'vs/base/parts/sandbox/common/sandboxTypes';
|
import { ISandboxConfiguration } from 'vs/base/parts/sandbox/common/sandboxTypes';
|
||||||
+import { getUserDataPath } from 'vs/platform/environment/node/userDataPath';
|
+import { getUserDataPath } from 'vs/platform/environment/node/userDataPath';
|
||||||
|
|
||||||
let product: IProductConfiguration;
|
/**
|
||||||
|
* @deprecated You MUST use `IProductService` if possible.
|
||||||
@@ -31,6 +32,32 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
@@ -34,6 +35,32 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
||||||
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
|
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
|
||||||
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string; };
|
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
|
||||||
|
|
||||||
+ // Merge user-customized product.json
|
+ // Merge user-customized product.json
|
||||||
+ try {
|
+ try {
|
||||||
@@ -61,7 +61,7 @@ index 09dfc64..fec0cfa 100644
|
|||||||
// Running out of sources
|
// Running out of sources
|
||||||
if (env['VSCODE_DEV']) {
|
if (env['VSCODE_DEV']) {
|
||||||
Object.assign(product, {
|
Object.assign(product, {
|
||||||
@@ -40,6 +67,19 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
@@ -44,6 +71,19 @@ else if (typeof require?.__$__nodeRequire === 'function') {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,144 +0,0 @@
|
|||||||
diff --git a/src/bootstrap-window.js b/src/bootstrap-window.js
|
|
||||||
index 0cc92ec..8ba8fb0 100644
|
|
||||||
--- a/src/bootstrap-window.js
|
|
||||||
+++ b/src/bootstrap-window.js
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
const bootstrapLib = bootstrap();
|
|
||||||
const preloadGlobals = sandboxGlobals();
|
|
||||||
const safeProcess = preloadGlobals.process;
|
|
||||||
+ const useCustomProtocol = safeProcess.sandboxed;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {import('./vs/base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration} ISandboxConfiguration
|
|
||||||
@@ -107,9 +108,9 @@
|
|
||||||
window['MonacoEnvironment'] = {};
|
|
||||||
|
|
||||||
const loaderConfig = {
|
|
||||||
- baseUrl: `${bootstrapLib.fileUriFromPath(configuration.appRoot, { isWindows: safeProcess.platform === 'win32', scheme: 'vscode-file', fallbackAuthority: 'vscode-app' })}/out`,
|
|
||||||
+ baseUrl: `${bootstrapLib.fileUriFromPath(configuration.appRoot, { isWindows: safeProcess.platform === 'win32' })}/out`,
|
|
||||||
'vs/nls': nlsConfig,
|
|
||||||
- preferScriptTags: true
|
|
||||||
+ preferScriptTags: useCustomProtocol
|
|
||||||
};
|
|
||||||
|
|
||||||
// use a trusted types policy when loading via script tags
|
|
||||||
@@ -143,6 +144,14 @@
|
|
||||||
loaderConfig.amdModulesPattern = /^vs\//;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // Cached data config (node.js loading only)
|
|
||||||
+ if (!useCustomProtocol && configuration.codeCachePath) {
|
|
||||||
+ loaderConfig.nodeCachedData = {
|
|
||||||
+ path: configuration.codeCachePath,
|
|
||||||
+ seed: modulePaths.join('')
|
|
||||||
+ };
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
// Signal before require.config()
|
|
||||||
if (typeof options?.beforeLoaderConfig === 'function') {
|
|
||||||
options.beforeLoaderConfig(loaderConfig);
|
|
||||||
diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts
|
|
||||||
index 41a3fe9..bbb06e3 100644
|
|
||||||
--- a/src/vs/base/common/network.ts
|
|
||||||
+++ b/src/vs/base/common/network.ts
|
|
||||||
@@ -166,16 +166,7 @@ class FileAccessImpl {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert to `vscode-file` resource..
|
|
||||||
- if (
|
|
||||||
- // ...only ever for `file` resources
|
|
||||||
- uri.scheme === Schemas.file &&
|
|
||||||
- (
|
|
||||||
- // ...and we run in native environments
|
|
||||||
- platform.isNative ||
|
|
||||||
- // ...or web worker extensions on desktop
|
|
||||||
- (typeof platform.globals.importScripts === 'function' && platform.globals.origin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`)
|
|
||||||
- )
|
|
||||||
- ) {
|
|
||||||
+ if (uri.scheme === Schemas.file && typeof platform.globals.importScripts === 'function' && platform.globals.origin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`) {
|
|
||||||
return uri.with({
|
|
||||||
scheme: Schemas.vscodeFileResource,
|
|
||||||
// We need to provide an authority here so that it can serve
|
|
||||||
diff --git a/src/vs/platform/protocol/electron-main/protocolMainService.ts b/src/vs/platform/protocol/electron-main/protocolMainService.ts
|
|
||||||
index bde08d8..3f09ad1 100644
|
|
||||||
--- a/src/vs/platform/protocol/electron-main/protocolMainService.ts
|
|
||||||
+++ b/src/vs/platform/protocol/electron-main/protocolMainService.ts
|
|
||||||
@@ -72,9 +72,24 @@ export class ProtocolMainService extends Disposable implements IProtocolMainServ
|
|
||||||
//#region file://
|
|
||||||
|
|
||||||
private handleFileRequest(request: Electron.ProtocolRequest, callback: ProtocolCallback) {
|
|
||||||
- const uri = URI.parse(request.url);
|
|
||||||
+ const fileUri = URI.parse(request.url);
|
|
||||||
+
|
|
||||||
+ // first check by validRoots
|
|
||||||
+ if (this.validRoots.findSubstr(fileUri)) {
|
|
||||||
+ return callback({
|
|
||||||
+ path: fileUri.fsPath
|
|
||||||
+ });
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- this.logService.error(`Refused to load resource ${uri.fsPath} from ${Schemas.file}: protocol (original URL: ${request.url})`);
|
|
||||||
+ // then check by validExtensions
|
|
||||||
+ if (this.validExtensions.has(extname(fileUri))) {
|
|
||||||
+ return callback({
|
|
||||||
+ path: fileUri.fsPath
|
|
||||||
+ });
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // finally block to load the resource
|
|
||||||
+ this.logService.error(`${Schemas.file}: Refused to load resource ${fileUri.fsPath} from ${Schemas.file}: protocol (original URL: ${request.url})`);
|
|
||||||
|
|
||||||
return callback({ error: -3 /* ABORTED */ });
|
|
||||||
}
|
|
||||||
diff --git a/src/vs/workbench/services/timer/electron-sandbox/timerService.ts b/src/vs/workbench/services/timer/electron-sandbox/timerService.ts
|
|
||||||
index 7cae207..1c54ac9 100644
|
|
||||||
--- a/src/vs/workbench/services/timer/electron-sandbox/timerService.ts
|
|
||||||
+++ b/src/vs/workbench/services/timer/electron-sandbox/timerService.ts
|
|
||||||
@@ -19,7 +19,7 @@ import { process } from 'vs/base/parts/sandbox/electron-sandbox/globals';
|
|
||||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
|
||||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
|
||||||
import { IProductService } from 'vs/platform/product/common/productService';
|
|
||||||
-import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
|
|
||||||
+import { IStorageService } from 'vs/platform/storage/common/storage';
|
|
||||||
|
|
||||||
export class TimerService extends AbstractTimerService {
|
|
||||||
|
|
||||||
@@ -91,24 +91,23 @@ registerSingleton(ITimerService, TimerService);
|
|
||||||
|
|
||||||
//#region cached data logic
|
|
||||||
|
|
||||||
-const lastRunningCommitStorageKey = 'perf/lastRunningCommit';
|
|
||||||
-let _didUseCachedData: boolean | undefined = undefined;
|
|
||||||
-
|
|
||||||
export function didUseCachedData(productService: IProductService, storageService: IStorageService, environmentService: INativeWorkbenchEnvironmentService): boolean {
|
|
||||||
- // browser code loading: only a guess based on
|
|
||||||
- // this being the first start with the commit
|
|
||||||
- // or subsequent
|
|
||||||
- if (typeof _didUseCachedData !== 'boolean') {
|
|
||||||
- if (!environmentService.configuration.codeCachePath || !productService.commit) {
|
|
||||||
- _didUseCachedData = false; // we only produce cached data whith commit and code cache path
|
|
||||||
- } else if (storageService.get(lastRunningCommitStorageKey, StorageScope.GLOBAL) === productService.commit) {
|
|
||||||
- _didUseCachedData = true; // subsequent start on same commit, assume cached data is there
|
|
||||||
- } else {
|
|
||||||
- storageService.store(lastRunningCommitStorageKey, productService.commit, StorageScope.GLOBAL, StorageTarget.MACHINE);
|
|
||||||
- _didUseCachedData = false; // first time start on commit, assume cached data is not yet there
|
|
||||||
+ if (!Boolean((<any>window).require.getConfig().nodeCachedData)) {
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+ // There are loader events that signal if cached data was missing, rejected,
|
|
||||||
+ // or used. The former two mean no cached data.
|
|
||||||
+ let cachedDataFound = 0;
|
|
||||||
+ for (const event of require.getStats()) {
|
|
||||||
+ switch (event.type) {
|
|
||||||
+ case LoaderEventType.CachedDataRejected:
|
|
||||||
+ return false;
|
|
||||||
+ case LoaderEventType.CachedDataFound:
|
|
||||||
+ cachedDataFound += 1;
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- return _didUseCachedData;
|
|
||||||
+ return cachedDataFound > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//#endregion
|
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
|
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
|
||||||
index 3d36081..5bac245 100644
|
index 92313d0..a69da37 100644
|
||||||
--- a/extensions/github-authentication/src/githubServer.ts
|
--- a/extensions/github-authentication/src/githubServer.ts
|
||||||
+++ b/extensions/github-authentication/src/githubServer.ts
|
+++ b/extensions/github-authentication/src/githubServer.ts
|
||||||
@@ -6,8 +6,6 @@
|
@@ -3,41 +3,13 @@
|
||||||
import * as nls from 'vscode-nls';
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
-import * as nls from 'vscode-nls';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import fetch, { Response } from 'node-fetch';
|
import fetch, { Response } from 'node-fetch';
|
||||||
-import { v4 as uuid } from 'uuid';
|
-import { v4 as uuid } from 'uuid';
|
||||||
@@ -11,19 +14,26 @@ index 3d36081..5bac245 100644
|
|||||||
import { ExperimentationTelemetry } from './experimentationService';
|
import { ExperimentationTelemetry } from './experimentationService';
|
||||||
import { AuthProviderType } from './github';
|
import { AuthProviderType } from './github';
|
||||||
import { Log } from './common/logger';
|
import { Log } from './common/logger';
|
||||||
@@ -15,8 +13,6 @@ import { Log } from './common/logger';
|
-import { isSupportedEnvironment } from './common/env';
|
||||||
const localize = nls.loadMessageBundle();
|
-
|
||||||
|
-const localize = nls.loadMessageBundle();
|
||||||
|
-const CLIENT_ID = '01ab8ac9400c4e429b23';
|
||||||
|
|
||||||
const NETWORK_ERROR = 'network error';
|
const NETWORK_ERROR = 'network error';
|
||||||
-const AUTH_RELAY_SERVER = 'vscode-auth.github.com';
|
-const AUTH_RELAY_SERVER = 'vscode-auth.github.com';
|
||||||
-// const AUTH_RELAY_STAGING_SERVER = 'client-auth-staging-14a768b.herokuapp.com';
|
-// const AUTH_RELAY_STAGING_SERVER = 'client-auth-staging-14a768b.herokuapp.com';
|
||||||
|
-
|
||||||
class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
|
-class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
|
||||||
constructor(private readonly Logger: Log) {
|
- constructor(private readonly Logger: Log) {
|
||||||
@@ -29,14 +25,6 @@ class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.
|
- super();
|
||||||
}
|
- }
|
||||||
}
|
-
|
||||||
|
- public handleUri(uri: vscode.Uri) {
|
||||||
|
- this.Logger.trace('Handling Uri...');
|
||||||
|
- this.fire(uri);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
-function parseQuery(uri: vscode.Uri) {
|
-function parseQuery(uri: vscode.Uri) {
|
||||||
- return uri.query.split('&').reduce((prev: any, current) => {
|
- return uri.query.split('&').reduce((prev: any, current) => {
|
||||||
- const queryString = current.split('=');
|
- const queryString = current.split('=');
|
||||||
@@ -31,46 +41,64 @@ index 3d36081..5bac245 100644
|
|||||||
- return prev;
|
- return prev;
|
||||||
- }, {});
|
- }, {});
|
||||||
-}
|
-}
|
||||||
-
|
|
||||||
export interface IGitHubServer extends vscode.Disposable {
|
export interface IGitHubServer extends vscode.Disposable {
|
||||||
login(scopes: string): Promise<string>;
|
login(scopes: string): Promise<string>;
|
||||||
getUserInfo(token: string): Promise<{ id: string, accountName: string }>;
|
@@ -47,13 +19,6 @@ export interface IGitHubServer extends vscode.Disposable {
|
||||||
@@ -96,11 +84,7 @@ async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): P
|
type: AuthProviderType;
|
||||||
|
}
|
||||||
|
|
||||||
|
-interface IGitHubDeviceCodeResponse {
|
||||||
|
- device_code: string;
|
||||||
|
- user_code: string;
|
||||||
|
- verification_uri: string;
|
||||||
|
- interval: number;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Promise<string[]> {
|
||||||
|
try {
|
||||||
|
logger.info('Getting token scopes...');
|
||||||
|
@@ -115,315 +80,49 @@ async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): P
|
||||||
export class GitHubServer implements IGitHubServer {
|
export class GitHubServer implements IGitHubServer {
|
||||||
friendlyName = 'GitHub';
|
friendlyName = 'GitHub';
|
||||||
type = AuthProviderType.github;
|
type = AuthProviderType.github;
|
||||||
- private _statusBarItem: vscode.StatusBarItem | undefined;
|
- private _statusBarItem: vscode.StatusBarItem | undefined;
|
||||||
- private _onDidManuallyProvideToken = new vscode.EventEmitter<string | undefined>();
|
- private _onDidManuallyProvideToken = new vscode.EventEmitter<string | undefined>();
|
||||||
|
-
|
||||||
- private _pendingStates = new Map<string, string[]>();
|
- private _pendingStates = new Map<string, string[]>();
|
||||||
- private _codeExchangePromises = new Map<string, { promise: Promise<string>, cancel: vscode.EventEmitter<void> }>();
|
- private _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
|
||||||
private _statusBarCommandId = `${this.type}.provide-manually`;
|
- private _statusBarCommandId = `${this.type}.provide-manually`;
|
||||||
private _disposable: vscode.Disposable;
|
- private _disposable: vscode.Disposable;
|
||||||
private _uriHandler = new UriEventHandler(this._logger);
|
- private _uriHandler = new UriEventHandler(this._logger);
|
||||||
@@ -115,150 +99,35 @@ export class GitHubServer implements IGitHubServer {
|
|
||||||
this._disposable.dispose();
|
constructor(private readonly _supportDeviceCodeFlow: boolean, private readonly _logger: Log, private readonly _telemetryReporter: ExperimentationTelemetry) {
|
||||||
|
- this._disposable = vscode.Disposable.from(
|
||||||
|
- vscode.commands.registerCommand(this._statusBarCommandId, () => this.manuallyProvideUri()),
|
||||||
|
- vscode.window.registerUriHandler(this._uriHandler));
|
||||||
|
+ this._supportDeviceCodeFlow;
|
||||||
}
|
}
|
||||||
|
|
||||||
- private isTestEnvironment(url: vscode.Uri): boolean {
|
dispose() {
|
||||||
- return /\.azurewebsites\.net$/.test(url.authority) || url.authority.startsWith('localhost:');
|
- this._disposable.dispose();
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- // TODO@joaomoreno TODO@TylerLeonhardt
|
- // TODO@joaomoreno TODO@TylerLeonhardt
|
||||||
- private async isNoCorsEnvironment(): Promise<boolean> {
|
- private async isNoCorsEnvironment(): Promise<boolean> {
|
||||||
- const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`));
|
- const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`));
|
||||||
- return (uri.scheme === 'https' && /^(vscode|github)\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority));
|
- return (uri.scheme === 'https' && /^((insiders\.)?vscode|github)\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority));
|
||||||
- }
|
}
|
||||||
-
|
|
||||||
public async login(scopes: string): Promise<string> {
|
public async login(scopes: string): Promise<string> {
|
||||||
this._logger.info(`Logging in for the following scopes: ${scopes}`);
|
this._logger.info(`Logging in for the following scopes: ${scopes}`);
|
||||||
|
|
||||||
- // TODO@joaomoreno TODO@TylerLeonhardt
|
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`));
|
||||||
- const nocors = await this.isNoCorsEnvironment();
|
|
||||||
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate${nocors ? '?nocors=true' : ''}`));
|
|
||||||
-
|
-
|
||||||
- if (this.isTestEnvironment(callbackUri)) {
|
- if (!isSupportedEnvironment(callbackUri)) {
|
||||||
- const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
- const token = this._supportDeviceCodeFlow
|
||||||
- if (!token) { throw new Error('Sign in failed: No token provided'); }
|
- ? await this.doDeviceCodeFlow(scopes)
|
||||||
|
- : await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
||||||
|
-
|
||||||
|
- if (!token) { throw new Error('No token provided'); }
|
||||||
-
|
-
|
||||||
- const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
- const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
||||||
- const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
- const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
||||||
@@ -79,22 +107,14 @@ index 3d36081..5bac245 100644
|
|||||||
- if (included || !scope.includes(':')) {
|
- if (included || !scope.includes(':')) {
|
||||||
- return included;
|
- return included;
|
||||||
- }
|
- }
|
||||||
+ const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
-
|
||||||
+ if (!token) { throw new Error('Sign in failed: No token provided'); }
|
|
||||||
|
|
||||||
- return scope.split(':').some(splitScopes => {
|
- return scope.split(':').some(splitScopes => {
|
||||||
- return tokenScopes.includes(splitScopes);
|
- return tokenScopes.includes(splitScopes);
|
||||||
- });
|
- });
|
||||||
- })) {
|
- })) {
|
||||||
- throw new Error(`The provided token is does not match the requested scopes: ${scopes}`);
|
- throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
||||||
+ const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
- }
|
||||||
+ const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
-
|
||||||
+ if (!scopesList.every(scope => {
|
|
||||||
+ const included = tokenScopes.includes(scope);
|
|
||||||
+ if (included || !scope.includes(':')) {
|
|
||||||
+ return included;
|
|
||||||
}
|
|
||||||
|
|
||||||
- return token;
|
- return token;
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
@@ -104,7 +124,7 @@ index 3d36081..5bac245 100644
|
|||||||
- const existingStates = this._pendingStates.get(scopes) || [];
|
- const existingStates = this._pendingStates.get(scopes) || [];
|
||||||
- this._pendingStates.set(scopes, [...existingStates, state]);
|
- this._pendingStates.set(scopes, [...existingStates, state]);
|
||||||
-
|
-
|
||||||
- const uri = vscode.Uri.parse(`https://${AUTH_RELAY_SERVER}/authorize/?callbackUri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&responseType=code&authServer=https://github.com${nocors ? '&nocors=true' : ''}`);
|
- const uri = vscode.Uri.parse(`https://${AUTH_RELAY_SERVER}/authorize/?callbackUri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&responseType=code&authServer=https://github.com`);
|
||||||
- await vscode.env.openExternal(uri);
|
- await vscode.env.openExternal(uri);
|
||||||
-
|
-
|
||||||
- // Register a single listener for the URI callback, in case the user starts the login process multiple times
|
- // Register a single listener for the URI callback, in case the user starts the login process multiple times
|
||||||
@@ -113,13 +133,8 @@ index 3d36081..5bac245 100644
|
|||||||
- if (!codeExchangePromise) {
|
- if (!codeExchangePromise) {
|
||||||
- codeExchangePromise = promiseFromEvent(this._uriHandler.event, this.exchangeCodeForToken(scopes));
|
- codeExchangePromise = promiseFromEvent(this._uriHandler.event, this.exchangeCodeForToken(scopes));
|
||||||
- this._codeExchangePromises.set(scopes, codeExchangePromise);
|
- this._codeExchangePromises.set(scopes, codeExchangePromise);
|
||||||
+ return scope.split(':').some(splitScopes => {
|
- }
|
||||||
+ return tokenScopes.includes(splitScopes);
|
-
|
||||||
+ });
|
|
||||||
+ })) {
|
|
||||||
+ throw new Error(`The provided token is does not match the requested scopes: ${scopes}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
- return Promise.race([
|
- return Promise.race([
|
||||||
- codeExchangePromise.promise,
|
- codeExchangePromise.promise,
|
||||||
- promiseFromEvent<string | undefined, string>(this._onDidManuallyProvideToken.event, (token: string | undefined, resolve, reject): void => {
|
- promiseFromEvent<string | undefined, string>(this._onDidManuallyProvideToken.event, (token: string | undefined, resolve, reject): void => {
|
||||||
@@ -136,6 +151,110 @@ index 3d36081..5bac245 100644
|
|||||||
- this._codeExchangePromises.delete(scopes);
|
- this._codeExchangePromises.delete(scopes);
|
||||||
- this.updateStatusBarItem(false);
|
- this.updateStatusBarItem(false);
|
||||||
- });
|
- });
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private async doDeviceCodeFlow(scopes: string): Promise<string> {
|
||||||
|
- // Get initial device code
|
||||||
|
- const uri = `https://github.com/login/device/code?client_id=${CLIENT_ID}&scope=${scopes}`;
|
||||||
|
- const result = await fetch(uri, {
|
||||||
|
- method: 'POST',
|
||||||
|
- headers: {
|
||||||
|
- Accept: 'application/json'
|
||||||
|
- }
|
||||||
|
- });
|
||||||
|
- if (!result.ok) {
|
||||||
|
- throw new Error(`Failed to get one-time code: ${await result.text()}`);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- const json = await result.json() as IGitHubDeviceCodeResponse;
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- const modalResult = await vscode.window.showInformationMessage(
|
||||||
|
- localize('code.title', "Your Code: {0}", json.user_code),
|
||||||
|
- {
|
||||||
|
- modal: true,
|
||||||
|
- detail: localize('code.detail', "To finish authenticating, navigate to GitHub and paste in the above one-time code.")
|
||||||
|
- }, 'Copy & Continue to GitHub');
|
||||||
|
-
|
||||||
|
- if (modalResult !== 'Copy & Continue to GitHub') {
|
||||||
|
- throw new Error('Cancelled');
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- await vscode.env.clipboard.writeText(json.user_code);
|
||||||
|
-
|
||||||
|
- const uriToOpen = await vscode.env.asExternalUri(vscode.Uri.parse(json.verification_uri));
|
||||||
|
- await vscode.env.openExternal(uriToOpen);
|
||||||
|
-
|
||||||
|
- return await vscode.window.withProgress<string>({
|
||||||
|
- location: vscode.ProgressLocation.Notification,
|
||||||
|
- cancellable: true,
|
||||||
|
- title: localize(
|
||||||
|
- 'progress',
|
||||||
|
- "Open [{0}]({0}) in a new tab and paste your one-time code: {1}",
|
||||||
|
- json.verification_uri,
|
||||||
|
- json.user_code)
|
||||||
|
- }, async (_, token) => {
|
||||||
|
- return await this.waitForDeviceCodeAccessToken(json, token);
|
||||||
|
- });
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private async waitForDeviceCodeAccessToken(
|
||||||
|
- json: IGitHubDeviceCodeResponse,
|
||||||
|
- token: vscode.CancellationToken
|
||||||
|
- ): Promise<string> {
|
||||||
|
-
|
||||||
|
- const refreshTokenUri = `https://github.com/login/oauth/access_token?client_id=${CLIENT_ID}&device_code=${json.device_code}&grant_type=urn:ietf:params:oauth:grant-type:device_code`;
|
||||||
|
-
|
||||||
|
- // Try for 2 minutes
|
||||||
|
- const attempts = 120 / json.interval;
|
||||||
|
- for (let i = 0; i < attempts; i++) {
|
||||||
|
- await new Promise(resolve => setTimeout(resolve, json.interval * 1000));
|
||||||
|
- if (token.isCancellationRequested) {
|
||||||
|
- throw new Error('Cancelled');
|
||||||
|
- }
|
||||||
|
- let accessTokenResult;
|
||||||
|
- try {
|
||||||
|
- accessTokenResult = await fetch(refreshTokenUri, {
|
||||||
|
- method: 'POST',
|
||||||
|
- headers: {
|
||||||
|
- Accept: 'application/json'
|
||||||
|
- }
|
||||||
|
- });
|
||||||
|
- } catch {
|
||||||
|
- continue;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (!accessTokenResult.ok) {
|
||||||
|
- continue;
|
||||||
|
- }
|
||||||
|
+ const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
||||||
|
|
||||||
|
- const accessTokenJson = await accessTokenResult.json();
|
||||||
|
+ if (!token) { throw new Error('No token provided'); }
|
||||||
|
|
||||||
|
- if (accessTokenJson.error === 'authorization_pending') {
|
||||||
|
- continue;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (accessTokenJson.error) {
|
||||||
|
- throw new Error(accessTokenJson.error_description);
|
||||||
|
+ const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
||||||
|
+ const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
||||||
|
+ if (!scopesList.every(scope => {
|
||||||
|
+ const included = tokenScopes.includes(scope);
|
||||||
|
+ if (included || !scope.includes(':')) {
|
||||||
|
+ return included;
|
||||||
|
}
|
||||||
|
|
||||||
|
- return accessTokenJson.access_token;
|
||||||
|
+ return scope.split(':').some(splitScopes => {
|
||||||
|
+ return tokenScopes.includes(splitScopes);
|
||||||
|
+ });
|
||||||
|
+ })) {
|
||||||
|
+ throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
- throw new Error('Cancelled');
|
||||||
+ return token;
|
+ return token;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,34 +277,23 @@ index 3d36081..5bac245 100644
|
|||||||
- const url = `https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`;
|
- const url = `https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`;
|
||||||
- this._logger.info('Exchanging code for token...');
|
- this._logger.info('Exchanging code for token...');
|
||||||
-
|
-
|
||||||
- // TODO@joao: remove
|
- try {
|
||||||
- if (query.nocors) {
|
- const result = await fetch(url, {
|
||||||
- try {
|
- method: 'POST',
|
||||||
- const json: any = await vscode.commands.executeCommand('_workbench.fetchJSON', url, 'POST');
|
- headers: {
|
||||||
|
- Accept: 'application/json'
|
||||||
|
- }
|
||||||
|
- });
|
||||||
|
-
|
||||||
|
- if (result.ok) {
|
||||||
|
- const json = await result.json();
|
||||||
- this._logger.info('Token exchange success!');
|
- this._logger.info('Token exchange success!');
|
||||||
- resolve(json.access_token);
|
- resolve(json.access_token);
|
||||||
- } catch (err) {
|
- } else {
|
||||||
- reject(err);
|
- reject(result.statusText);
|
||||||
- }
|
|
||||||
- } else {
|
|
||||||
- try {
|
|
||||||
- const result = await fetch(url, {
|
|
||||||
- method: 'POST',
|
|
||||||
- headers: {
|
|
||||||
- Accept: 'application/json'
|
|
||||||
- }
|
|
||||||
- });
|
|
||||||
-
|
|
||||||
- if (result.ok) {
|
|
||||||
- const json = await result.json();
|
|
||||||
- this._logger.info('Token exchange success!');
|
|
||||||
- resolve(json.access_token);
|
|
||||||
- } else {
|
|
||||||
- reject(result.statusText);
|
|
||||||
- }
|
|
||||||
- } catch (ex) {
|
|
||||||
- reject(ex);
|
|
||||||
- }
|
- }
|
||||||
|
- } catch (ex) {
|
||||||
|
- reject(ex);
|
||||||
- }
|
- }
|
||||||
- };
|
- };
|
||||||
-
|
-
|
||||||
@@ -209,14 +317,41 @@ index 3d36081..5bac245 100644
|
|||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
private async manuallyProvideUri() {
|
- private async manuallyProvideUri() {
|
||||||
const uri = await vscode.window.showInputBox({
|
- const uri = await vscode.window.showInputBox({
|
||||||
prompt: 'Uri',
|
- prompt: 'Uri',
|
||||||
@@ -290,41 +159,7 @@ export class GitHubServer implements IGitHubServer {
|
- ignoreFocusOut: true,
|
||||||
|
- validateInput(value) {
|
||||||
|
- if (!value) {
|
||||||
|
- return undefined;
|
||||||
|
- }
|
||||||
|
- const error = localize('validUri', "Please enter a valid Uri from the GitHub login page.");
|
||||||
|
- try {
|
||||||
|
- const uri = vscode.Uri.parse(value.trim());
|
||||||
|
- if (!uri.scheme || uri.scheme === 'file') {
|
||||||
|
- return error;
|
||||||
|
- }
|
||||||
|
- } catch (e) {
|
||||||
|
- return error;
|
||||||
|
- }
|
||||||
|
- return undefined;
|
||||||
|
- }
|
||||||
|
- });
|
||||||
|
- if (!uri) {
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- this._uriHandler.handleUri(vscode.Uri.parse(uri.trim()));
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
public getUserInfo(token: string): Promise<{ id: string; accountName: string }> {
|
||||||
return getUserInfo(token, this.getServerUri('/user'), this._logger);
|
return getUserInfo(token, this.getServerUri('/user'), this._logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
- public async sendAdditionalTelemetryInfo(token: string): Promise<void> {
|
- public async sendAdditionalTelemetryInfo(token: string): Promise<void> {
|
||||||
|
- if (!vscode.env.isTelemetryEnabled) {
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
- const nocors = await this.isNoCorsEnvironment();
|
- const nocors = await this.isNoCorsEnvironment();
|
||||||
-
|
-
|
||||||
- if (nocors) {
|
- if (nocors) {
|
||||||
@@ -233,7 +368,7 @@ index 3d36081..5bac245 100644
|
|||||||
- });
|
- });
|
||||||
-
|
-
|
||||||
- if (result.ok) {
|
- if (result.ok) {
|
||||||
- const json: { student: boolean, faculty: boolean } = await result.json();
|
- const json: { student: boolean; faculty: boolean } = await result.json();
|
||||||
-
|
-
|
||||||
- /* __GDPR__
|
- /* __GDPR__
|
||||||
- "session" : {
|
- "session" : {
|
||||||
@@ -251,7 +386,7 @@ index 3d36081..5bac245 100644
|
|||||||
- } catch (e) {
|
- } catch (e) {
|
||||||
- // No-op
|
- // No-op
|
||||||
- }
|
- }
|
||||||
+ public async sendAdditionalTelemetryInfo(_token: string): Promise<void> {
|
+ public async sendAdditionalTelemetryInfo(_: string): Promise<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async checkEnterpriseVersion(token: string): Promise<void> {
|
public async checkEnterpriseVersion(token: string): Promise<void> {
|
||||||
|
|||||||
92
prepare_artifacts.sh
Executable file
92
prepare_artifacts.sh
Executable file
@@ -0,0 +1,92 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
npm install -g checksum
|
||||||
|
|
||||||
|
sum_file() {
|
||||||
|
if [[ -f "$1" ]]; then
|
||||||
|
echo "Calcuating checksum for $1"
|
||||||
|
checksum -a sha256 "$1" > "$1".sha256
|
||||||
|
checksum "$1" > "$1".sha1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir artifacts
|
||||||
|
|
||||||
|
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||||
|
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||||
|
echo "Building and moving ZIP"
|
||||||
|
cd "VSCode-darwin-${VSCODE_ARCH}"
|
||||||
|
zip -r -X -y ../artifacts/VSCodium-darwin-${VSCODE_ARCH}-${MS_TAG}.zip ./*.app
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_DMG}" != "no" ]]; then
|
||||||
|
echo "Building and moving DMG"
|
||||||
|
pushd "VSCode-darwin-${VSCODE_ARCH}"
|
||||||
|
npx create-dmg VSCodium.app ..
|
||||||
|
mv "../VSCodium ${MS_TAG}.dmg" "../artifacts/VSCodium.${VSCODE_ARCH}.${MS_TAG}.dmg"
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||||
|
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||||
|
echo "Moving ZIP"
|
||||||
|
mv vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip artifacts\\VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
|
||||||
|
echo "Moving System EXE"
|
||||||
|
mv vscode\\.build\\win32-${VSCODE_ARCH}\\system-setup\\VSCodeSetup.exe artifacts\\VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then
|
||||||
|
echo "Moving User EXE"
|
||||||
|
mv vscode\\.build\\win32-${VSCODE_ARCH}\\user-setup\\VSCodeSetup.exe artifacts\\VSCodiumUserSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
||||||
|
if [[ "${SHOULD_BUILD_MSI}" != "no" ]]; then
|
||||||
|
echo "Moving MSI"
|
||||||
|
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi artifacts/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then
|
||||||
|
echo "Moving MSI with disabled updates"
|
||||||
|
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi artifacts/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ "${SHOULD_BUILD_TAR}" != "no" ]]; then
|
||||||
|
echo "Building and moving TAR"
|
||||||
|
cd VSCode-linux-${VSCODE_ARCH}
|
||||||
|
tar czf ../artifacts/VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz .
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_DEB}" != "no" ]]; then
|
||||||
|
echo "Moving DEB"
|
||||||
|
mv vscode/.build/linux/deb/*/deb/*.deb artifacts/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_RPM}" != "no" ]]; then
|
||||||
|
echo "Moving RPM"
|
||||||
|
mv vscode/.build/linux/rpm/*/*.rpm artifacts/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
|
||||||
|
echo "Moving AppImage"
|
||||||
|
mv build/linux/appimage/out/*.AppImage* artifacts/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd artifacts
|
||||||
|
|
||||||
|
for FILE in *
|
||||||
|
do
|
||||||
|
if [[ -f "${FILE}" ]]; then
|
||||||
|
sum_file "${FILE}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd ..
|
||||||
66
release.sh
Executable file
66
release.sh
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||||
|
echo "Will not release because no GITHUB_TOKEN defined"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
npm install -g github-release-cli
|
||||||
|
|
||||||
|
if [[ $( gh release view "${MS_TAG}" 2>&1 ) =~ "release not found" ]]; then
|
||||||
|
echo "Creating release '${MS_TAG}'"
|
||||||
|
gh release create "${MS_TAG}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd artifacts
|
||||||
|
|
||||||
|
set +e
|
||||||
|
|
||||||
|
OWNER="${GITHUB_REPOSITORY_OWNER:-"VSCodium"}"
|
||||||
|
REPO_NAME="${GITHUB_REPOSITORY:(${#OWNER}+1)}"
|
||||||
|
REPOSITORY="${REPO_NAME:-"vscodium"}"
|
||||||
|
|
||||||
|
for FILE in *
|
||||||
|
do
|
||||||
|
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
|
||||||
|
echo "::group::Uploading '${FILE}' at $( date "+%T" )"
|
||||||
|
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||||
|
|
||||||
|
EXIT_STATUS=$?
|
||||||
|
echo "exit: $EXIT_STATUS"
|
||||||
|
|
||||||
|
if (( $EXIT_STATUS )); then
|
||||||
|
for (( i=0; i<10; i++ ))
|
||||||
|
do
|
||||||
|
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||||
|
|
||||||
|
sleep $(( 15 * (i + 1)))
|
||||||
|
|
||||||
|
echo "RE-Uploading '${FILE}' at $( date "+%T" )"
|
||||||
|
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||||
|
|
||||||
|
EXIT_STATUS=$?
|
||||||
|
echo "exit: $EXIT_STATUS"
|
||||||
|
|
||||||
|
if ! (( $EXIT_STATUS )); then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "exit: $EXIT_STATUS"
|
||||||
|
|
||||||
|
if (( $EXIT_STATUS )); then
|
||||||
|
echo "'${FILE}' hasn't been uploaded!"
|
||||||
|
|
||||||
|
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "::endgroup::"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd ..
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<svg width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="40" height="40" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
|
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
|
||||||
<title>codium_grey_dark_letterpress</title>
|
<title>codium_grey_dark_letterpress</title>
|
||||||
<desc>Created with Sketch.</desc>
|
<desc>Created with Sketch.</desc>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<svg width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="40" height="40" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
|
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
|
||||||
<title>codium_grey_hc_letterpress</title>
|
<title>codium_grey_hc_letterpress</title>
|
||||||
<desc>Created with Sketch.</desc>
|
<desc>Created with Sketch.</desc>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<svg width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="40" height="40" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
|
<!-- Generator: Sketch 55 (78076) - https://sketchapp.com -->
|
||||||
<title>codium_grey_letterpress</title>
|
<title>codium_grey_letterpress</title>
|
||||||
<desc>Created with Sketch.</desc>
|
<desc>Created with Sketch.</desc>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
43
stores/snapcraft/check_version.sh
Executable file
43
stores/snapcraft/check_version.sh
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
|
||||||
|
echo "It's a PR"
|
||||||
|
|
||||||
|
export SHOULD_DEPLOY="no"
|
||||||
|
elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
|
||||||
|
echo "It's a Push"
|
||||||
|
|
||||||
|
export SHOULD_DEPLOY="no"
|
||||||
|
else
|
||||||
|
echo "It's a cron"
|
||||||
|
|
||||||
|
sudo snap install --channel stable --classic snapcraft
|
||||||
|
|
||||||
|
echo "$SNAP_STORE_LOGIN" | snapcraft login --with -
|
||||||
|
|
||||||
|
echo "Architecture: ${ARCHITECTURE}"
|
||||||
|
|
||||||
|
SNAP_VERSION=$(snapcraft list-revisions codium | grep -F stable* | grep ${ARCHITECTURE} | tr -s ' ' | cut -d ' ' -f 4)
|
||||||
|
echo "Snap version: ${SNAP_VERSION}"
|
||||||
|
|
||||||
|
wget --quiet https://api.github.com/repos/VSCodium/vscodium/releases -O gh_latest.json
|
||||||
|
GH_VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' gh_latest.json)
|
||||||
|
echo "GH version: ${GH_VERSION}"
|
||||||
|
|
||||||
|
rm -f gh_latest.json
|
||||||
|
|
||||||
|
if [[ "${SNAP_VERSION}" == "${GH_VERSION}" ]]; then
|
||||||
|
export SHOULD_DEPLOY="no"
|
||||||
|
else
|
||||||
|
export SHOULD_DEPLOY="yes"
|
||||||
|
|
||||||
|
snap version
|
||||||
|
snap info codium
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $GITHUB_ENV ]]; then
|
||||||
|
echo "SHOULD_DEPLOY=$SHOULD_DEPLOY" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
34
stores/snapcraft/snap/local/bin/electron-launch
Executable file
34
stores/snapcraft/snap/local/bin/electron-launch
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# On Fedora $SNAP is under /var and there is some magic to map it to /snap.
|
||||||
|
# We need to handle that case and reset $SNAP
|
||||||
|
SNAP=$(echo "$SNAP" | sed -e "s|/var/lib/snapd||g")
|
||||||
|
|
||||||
|
if [ "$SNAP_ARCH" == "amd64" ]; then
|
||||||
|
ARCH="x86_64-linux-gnu"
|
||||||
|
elif [ "$SNAP_ARCH" == "armhf" ]; then
|
||||||
|
ARCH="arm-linux-gnueabihf"
|
||||||
|
elif [ "$SNAP_ARCH" == "arm64" ]; then
|
||||||
|
ARCH="aarch64-linux-gnu"
|
||||||
|
else
|
||||||
|
ARCH="$SNAP_ARCH-linux-gnu"
|
||||||
|
fi
|
||||||
|
|
||||||
|
GDK_CACHE_DIR="$SNAP_USER_COMMON/.cache"
|
||||||
|
if [[ -d "$SNAP_USER_DATA/.cache" && ! -e "$GDK_CACHE_DIR" ]]; then
|
||||||
|
# the .cache directory used to be stored under $SNAP_USER_DATA, migrate it
|
||||||
|
mv "$SNAP_USER_DATA/.cache" "$SNAP_USER_COMMON/"
|
||||||
|
fi
|
||||||
|
[ ! -d "$GDK_CACHE_DIR" ] && mkdir -p "$GDK_CACHE_DIR"
|
||||||
|
|
||||||
|
# Gdk-pixbuf loaders
|
||||||
|
export GDK_PIXBUF_MODULE_FILE="$GDK_CACHE_DIR/gdk-pixbuf-loaders.cache"
|
||||||
|
export GDK_PIXBUF_MODULEDIR="$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/2.10.0/loaders"
|
||||||
|
if [ -f "$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" ]; then
|
||||||
|
"$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" > "$GDK_PIXBUF_MODULE_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create $XDG_RUNTIME_DIR if not exists (to be removed when https://pad.lv/1656340 is fixed)
|
||||||
|
[ -n "$XDG_RUNTIME_DIR" ] && mkdir -p "$XDG_RUNTIME_DIR" -m 700
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
91
stores/snapcraft/snap/snapcraft.yaml
Normal file
91
stores/snapcraft/snap/snapcraft.yaml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
name: codium
|
||||||
|
adopt-info: codium
|
||||||
|
summary: Code editing. Redefined.
|
||||||
|
description: |
|
||||||
|
Binary releases of Code without branding/telemetry/licensing
|
||||||
|
|
||||||
|
base: core18
|
||||||
|
grade: stable
|
||||||
|
confinement: classic
|
||||||
|
compression: lzo
|
||||||
|
architectures:
|
||||||
|
- build-on: amd64
|
||||||
|
- build-on: arm64
|
||||||
|
|
||||||
|
parts:
|
||||||
|
codium:
|
||||||
|
plugin: nil
|
||||||
|
override-build: |
|
||||||
|
set -eu
|
||||||
|
ARCHITECTURE=$(dpkg --print-architecture)
|
||||||
|
# Get GitHub releases
|
||||||
|
wget --quiet https://api.github.com/repos/VSCodium/vscodium/releases -O latest.json
|
||||||
|
VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' latest.json)
|
||||||
|
DEB_URL=$(jq -r 'map(select(.tag_name == "'"$VERSION"'"))|first.assets[].browser_download_url|select(endswith("'"_$ARCHITECTURE.deb"'"))' latest.json)
|
||||||
|
DEB=$(basename "${DEB_URL}")
|
||||||
|
# Downloading .deb"
|
||||||
|
wget "${DEB_URL}" -O "${SNAPCRAFT_PART_INSTALL}/${DEB}"
|
||||||
|
# Unpacking .deb"
|
||||||
|
dpkg -x "${SNAPCRAFT_PART_INSTALL}/${DEB}" ${SNAPCRAFT_PART_INSTALL}
|
||||||
|
rm -f latest.json
|
||||||
|
rm -f "${SNAPCRAFT_PART_INSTALL}/${DEB}"
|
||||||
|
# Set version
|
||||||
|
snapcraftctl set-version "$VERSION"
|
||||||
|
# Correct path to icon.
|
||||||
|
sed -i 's|Icon=vscodium|Icon=${SNAP}/usr/share/pixmaps/vscodium.png|g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/codium.desktop
|
||||||
|
sed -i 's|Exec=/usr/share/codium/codium|Exec=codium|g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/codium.desktop
|
||||||
|
sed -i 's|Icon=vscodium|Icon=/usr/share/pixmaps/vscodium.png|g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/codium-url-handler.desktop
|
||||||
|
build-packages:
|
||||||
|
- wget
|
||||||
|
- jq
|
||||||
|
stage-packages:
|
||||||
|
- fcitx-frontend-gtk3
|
||||||
|
- gvfs-libs
|
||||||
|
- libasound2
|
||||||
|
- libgconf-2-4
|
||||||
|
- libglib2.0-bin
|
||||||
|
- libgnome-keyring0
|
||||||
|
- libgtk-3-0
|
||||||
|
- libnotify4
|
||||||
|
- libnspr4
|
||||||
|
- libnss3
|
||||||
|
- libpcre3
|
||||||
|
- libpulse0
|
||||||
|
- libsecret-1-0
|
||||||
|
- libxshmfence1
|
||||||
|
- libxss1
|
||||||
|
- libxtst6
|
||||||
|
- zlib1g
|
||||||
|
- libx11-xcb1
|
||||||
|
- libxkbfile1
|
||||||
|
- libdrm2
|
||||||
|
- libgbm1
|
||||||
|
- libxcb-dri3-0
|
||||||
|
prime:
|
||||||
|
- -usr/share/doc
|
||||||
|
- -usr/share/fonts
|
||||||
|
- -usr/share/icons
|
||||||
|
- -usr/share/lintian
|
||||||
|
- -usr/share/man
|
||||||
|
- -usr/share/codium/chrome-sandbox
|
||||||
|
|
||||||
|
electron-launch:
|
||||||
|
after:
|
||||||
|
- codium
|
||||||
|
plugin: dump
|
||||||
|
source: snap/local
|
||||||
|
|
||||||
|
apps:
|
||||||
|
codium:
|
||||||
|
command: electron-launch $SNAP/usr/share/codium/bin/codium --no-sandbox
|
||||||
|
desktop: usr/share/applications/codium.desktop
|
||||||
|
environment:
|
||||||
|
DISABLE_WAYLAND: 1
|
||||||
|
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
|
||||||
|
|
||||||
|
url-handler:
|
||||||
|
command: electron-launch $SNAP/usr/share/codium/bin/codium --open-url --no-sandbox
|
||||||
|
desktop: usr/share/applications/codium-url-handler.desktop
|
||||||
|
environment:
|
||||||
|
DISABLE_WAYLAND: 1
|
||||||
|
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
|
||||||
28
sum.sh
28
sum.sh
@@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
npm install -g checksum
|
|
||||||
|
|
||||||
sum_file () {
|
|
||||||
if [[ -f "$1" ]]; then
|
|
||||||
checksum -a sha256 "$1" > "$1".sha256
|
|
||||||
checksum "$1" > "$1".sha1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ "$SHOULD_BUILD" == "yes" ]]; then
|
|
||||||
if [[ "$OS_NAME" == "osx" ]]; then
|
|
||||||
sum_file VSCodium-darwin-*.zip
|
|
||||||
sum_file VSCodium*.dmg
|
|
||||||
elif [[ "$OS_NAME" == "windows" ]]; then
|
|
||||||
sum_file VSCodiumSetup-*.exe
|
|
||||||
sum_file VSCodiumUserSetup-*.exe
|
|
||||||
sum_file VSCodium-win32-*.zip
|
|
||||||
sum_file "VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi"
|
|
||||||
sum_file "VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi"
|
|
||||||
else # linux
|
|
||||||
sum_file VSCodium-*.AppImage
|
|
||||||
sum_file VSCodium-linux*.tar.gz
|
|
||||||
sum_file *.deb
|
|
||||||
sum_file *.rpm
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
DEFAULT_TRUE="'default': true"
|
DEFAULT_TRUE="'default': true"
|
||||||
DEFAULT_FALSE="'default': false"
|
DEFAULT_FALSE="'default': false"
|
||||||
|
DEFAULT_ON="'default': TelemetryConfiguration.ON"
|
||||||
|
DEFAULT_OFF="'default': TelemetryConfiguration.OFF"
|
||||||
TELEMETRY_ENABLE="'telemetry.enableTelemetry':"
|
TELEMETRY_ENABLE="'telemetry.enableTelemetry':"
|
||||||
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
||||||
|
TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON"
|
||||||
|
|
||||||
#include common functions
|
#include common functions
|
||||||
. ../utils.sh
|
. ../utils.sh
|
||||||
@@ -22,7 +25,7 @@ update_setting () {
|
|||||||
if [[ $line == *"$SETTING"* ]]; then
|
if [[ $line == *"$SETTING"* ]]; then
|
||||||
local IN_SETTING=1
|
local IN_SETTING=1
|
||||||
fi
|
fi
|
||||||
if [[ $line == *"$DEFAULT_TRUE"* && "$IN_SETTING" == "1" ]]; then
|
if [[ ($line == *"$DEFAULT_TRUE"* || $line == *"$DEFAULT_ON"*) && "$IN_SETTING" == "1" ]]; then
|
||||||
local FOUND=1
|
local FOUND=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@@ -34,10 +37,15 @@ update_setting () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# construct line-aware replacement string
|
# construct line-aware replacement string
|
||||||
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
|
if [[ $line == *"$DEFAULT_TRUE"* ]]; then
|
||||||
|
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
|
||||||
|
else
|
||||||
|
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/"
|
||||||
|
fi
|
||||||
|
|
||||||
replace "$DEFAULT_TRUE_TO_FALSE" $FILENAME
|
replace "$DEFAULT_TRUE_TO_FALSE" $FILENAME
|
||||||
}
|
}
|
||||||
|
|
||||||
update_setting "$TELEMETRY_ENABLE" src/vs/platform/telemetry/common/telemetryService.ts
|
update_setting "$TELEMETRY_ENABLE" src/vs/platform/telemetry/common/telemetryService.ts
|
||||||
update_setting "$TELEMETRY_CRASH_REPORTER" src/vs/workbench/electron-sandbox/desktop.contribution.ts
|
update_setting "$TELEMETRY_CRASH_REPORTER" src/vs/workbench/electron-sandbox/desktop.contribution.ts
|
||||||
|
update_setting "$TELEMETRY_CONFIGURATION" src/vs/platform/telemetry/common/telemetryService.ts
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ "$SHOULD_BUILD" != "yes" ]]; then
|
set -e
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
echo "Will not update version JSON because we did not build"
|
echo "Will not update version JSON because we did not build"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||||
|
echo "Will not update version JSON because no GITHUB_TOKEN defined"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# {
|
# {
|
||||||
# "url": "https://az764295.vo.msecnd.net/stable/51b0b28134d51361cf996d2f0a1c698247aeabd8/VSCode-darwin-stable.zip",
|
# "url": "https://az764295.vo.msecnd.net/stable/51b0b28134d51361cf996d2f0a1c698247aeabd8/VSCode-darwin-stable.zip",
|
||||||
# "name": "1.33.1",
|
# "name": "1.33.1",
|
||||||
@@ -24,37 +31,40 @@ fi
|
|||||||
# `timestamp` is $(node -e 'console.log(Date.now())')
|
# `timestamp` is $(node -e 'console.log(Date.now())')
|
||||||
# `sha256hash` in <filename>.sha256
|
# `sha256hash` in <filename>.sha256
|
||||||
|
|
||||||
URL_BASE=https://github.com/VSCodium/vscodium/releases/download/${MS_TAG}
|
URL_BASE="https://github.com/VSCodium/vscodium/releases/download/${MS_TAG}"
|
||||||
|
|
||||||
# to make testing on forks easier
|
# to make testing on forks easier
|
||||||
VERSIONS_REPO="${GITHUB_USERNAME}/versions"
|
VERSIONS_REPO="${GITHUB_USERNAME}/versions"
|
||||||
echo "Versions repo:" $VERSIONS_REPO
|
echo "Versions repo: ${VERSIONS_REPO}"
|
||||||
|
|
||||||
# generateJson <assetName>
|
|
||||||
# e.g. generateJson VSCodium-darwin-1.33.0.zip
|
|
||||||
generateJson() {
|
generateJson() {
|
||||||
local assetName=$1
|
JSON_DATA="{}"
|
||||||
|
|
||||||
# generate parts
|
# generate parts
|
||||||
local url=${URL_BASE}/${assetName}
|
local url="${URL_BASE}/${ASSET_NAME}"
|
||||||
local name=$MS_TAG
|
local name="${MS_TAG}"
|
||||||
local version=$MS_COMMIT
|
local version="${MS_COMMIT}"
|
||||||
local productVersion=$MS_TAG
|
local productVersion="${MS_TAG}"
|
||||||
local timestamp=$(node -e 'console.log(Date.now())')
|
local timestamp=$(node -e 'console.log(Date.now())')
|
||||||
|
|
||||||
local sha1hash=$(cat ${assetName}.sha1 | awk '{ print $1 }')
|
if [[ ! -f "artifacts/${ASSET_NAME}" ]]; then
|
||||||
local sha256hash=$(cat ${assetName}.sha256 | awk '{ print $1 }')
|
echo "Downloading artifact '${ASSET_NAME}'"
|
||||||
|
gh release download "${MS_TAG}" --dir "artifacts" --pattern "${ASSET_NAME}*"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local sha1hash=$(cat "artifacts/${ASSET_NAME}.sha1" | awk '{ print $1 }')
|
||||||
|
local sha256hash=$(cat "artifacts/${ASSET_NAME}.sha256" | awk '{ print $1 }')
|
||||||
|
|
||||||
# check that nothing is blank (blank indicates something awry with build)
|
# check that nothing is blank (blank indicates something awry with build)
|
||||||
for key in url name version productVersion sha1hash timestamp sha256hash; do
|
for key in url name version productVersion sha1hash timestamp sha256hash; do
|
||||||
if [[ "${!key}" == "" ]]; then
|
if [[ -z "${key}" ]]; then
|
||||||
echo "Missing data for version update; exiting..."
|
echo "Variable '${key}' is empty; exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# generate json
|
# generate json
|
||||||
local json=$(jq \
|
JSON_DATA=$(jq \
|
||||||
--arg url "${url}" \
|
--arg url "${url}" \
|
||||||
--arg name "${name}" \
|
--arg name "${name}" \
|
||||||
--arg version "${version}" \
|
--arg version "${version}" \
|
||||||
@@ -64,70 +74,62 @@ generateJson() {
|
|||||||
--arg sha256hash "${sha256hash}" \
|
--arg sha256hash "${sha256hash}" \
|
||||||
'. | .url=$url | .name=$name | .version=$version | .productVersion=$productVersion | .hash=$hash | .timestamp=$timestamp | .sha256hash=$sha256hash' \
|
'. | .url=$url | .name=$name | .version=$version | .productVersion=$productVersion | .hash=$hash | .timestamp=$timestamp | .sha256hash=$sha256hash' \
|
||||||
<<<'{}')
|
<<<'{}')
|
||||||
|
|
||||||
echo "$json"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateLatestVersion() {
|
updateLatestVersion() {
|
||||||
|
echo "Generating ${VERSION_PATH}/latest.json"
|
||||||
|
|
||||||
|
generateJson
|
||||||
|
|
||||||
cd versions
|
cd versions
|
||||||
|
|
||||||
local versionPath=$1
|
|
||||||
local json=$2
|
|
||||||
|
|
||||||
# create/update the latest.json file in the correct location
|
# create/update the latest.json file in the correct location
|
||||||
mkdir -p $versionPath
|
mkdir -p "${VERSION_PATH}"
|
||||||
echo $json > $versionPath/latest.json
|
echo "${JSON_DATA}" > "${VERSION_PATH}/latest.json"
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
# init versions repo for later commiting + pushing the json file to it
|
# init versions repo for later commiting + pushing the json file to it
|
||||||
# thank you https://www.vinaygopinath.me/blog/tech/commit-to-master-branch-on-github-using-travis-ci/
|
# thank you https://www.vinaygopinath.me/blog/tech/commit-to-master-branch-on-github-using-travis-ci/
|
||||||
git clone https://github.com/${VERSIONS_REPO}.git
|
git clone "https://github.com/${VERSIONS_REPO}.git"
|
||||||
cd versions
|
cd versions
|
||||||
git config user.email "vscodium-ci@not-real.com"
|
git config user.email "vscodium-ci@not-real.com"
|
||||||
git config user.name "VSCodium CI"
|
git config user.name "VSCodium CI"
|
||||||
git remote rm origin
|
git remote rm origin
|
||||||
git remote add origin https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${VERSIONS_REPO}.git > /dev/null 2>&1
|
git remote add origin "https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${VERSIONS_REPO}.git" > /dev/null 2>&1
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
if [[ "$OS_NAME" == "osx" ]]; then
|
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||||
# zip, sha1, and sha256 files are all at top level dir
|
|
||||||
ASSET_NAME=VSCodium-darwin-${VSCODE_ARCH}-${MS_TAG}.zip
|
ASSET_NAME=VSCodium-darwin-${VSCODE_ARCH}-${MS_TAG}.zip
|
||||||
VERSION_PATH="darwin/${VSCODE_ARCH}"
|
VERSION_PATH="darwin/${VSCODE_ARCH}"
|
||||||
JSON="$(generateJson ${ASSET_NAME})"
|
updateLatestVersion
|
||||||
updateLatestVersion "$VERSION_PATH" "$JSON"
|
elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||||
elif [[ "$OS_NAME" == "windows" ]]; then
|
|
||||||
# system installer
|
# system installer
|
||||||
ASSET_NAME=VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
ASSET_NAME=VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
||||||
VERSION_PATH="win32/${VSCODE_ARCH}/system"
|
VERSION_PATH="win32/${VSCODE_ARCH}/system"
|
||||||
JSON="$(generateJson ${ASSET_NAME})"
|
updateLatestVersion
|
||||||
updateLatestVersion "$VERSION_PATH" "$JSON"
|
|
||||||
|
|
||||||
# user installer
|
# user installer
|
||||||
ASSET_NAME=VSCodiumUserSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
ASSET_NAME=VSCodiumUserSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
||||||
VERSION_PATH="win32/${VSCODE_ARCH}/user"
|
VERSION_PATH="win32/${VSCODE_ARCH}/user"
|
||||||
JSON="$(generateJson ${ASSET_NAME})"
|
updateLatestVersion
|
||||||
updateLatestVersion "$VERSION_PATH" "$JSON"
|
|
||||||
|
|
||||||
# windows archive
|
# windows archive
|
||||||
ASSET_NAME=VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip
|
ASSET_NAME=VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip
|
||||||
VERSION_PATH="win32/${VSCODE_ARCH}/archive"
|
VERSION_PATH="win32/${VSCODE_ARCH}/archive"
|
||||||
JSON="$(generateJson ${ASSET_NAME})"
|
updateLatestVersion
|
||||||
updateLatestVersion "$VERSION_PATH" "$JSON"
|
|
||||||
|
|
||||||
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
||||||
# msi
|
# msi
|
||||||
ASSET_NAME=VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi
|
ASSET_NAME=VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi
|
||||||
VERSION_PATH="win32/${VSCODE_ARCH}/msi"
|
VERSION_PATH="win32/${VSCODE_ARCH}/msi"
|
||||||
JSON="$(generateJson ${ASSET_NAME})"
|
updateLatestVersion
|
||||||
updateLatestVersion "$VERSION_PATH" "$JSON"
|
|
||||||
|
|
||||||
# updates-disabled msi
|
# updates-disabled msi
|
||||||
ASSET_NAME=VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi
|
ASSET_NAME=VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi
|
||||||
VERSION_PATH="win32/${VSCODE_ARCH}/msi-updates-disabled"
|
VERSION_PATH="win32/${VSCODE_ARCH}/msi-updates-disabled"
|
||||||
JSON="$(generateJson ${ASSET_NAME})"
|
updateLatestVersion
|
||||||
updateLatestVersion "$VERSION_PATH" "$JSON"
|
|
||||||
fi
|
fi
|
||||||
else # linux
|
else # linux
|
||||||
# update service links to tar.gz file
|
# update service links to tar.gz file
|
||||||
@@ -135,19 +137,23 @@ else # linux
|
|||||||
# as examples
|
# as examples
|
||||||
ASSET_NAME=VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz
|
ASSET_NAME=VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz
|
||||||
VERSION_PATH="linux/${VSCODE_ARCH}"
|
VERSION_PATH="linux/${VSCODE_ARCH}"
|
||||||
JSON="$(generateJson ${ASSET_NAME})"
|
updateLatestVersion
|
||||||
updateLatestVersion "$VERSION_PATH" "$JSON"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd versions
|
cd versions
|
||||||
|
|
||||||
git pull origin master # in case another build just pushed
|
git pull origin master # in case another build just pushed
|
||||||
git add .
|
git add .
|
||||||
dateAndMonth=`date "+%D %T"`
|
|
||||||
git commit -m "CI update: $dateAndMonth (Build $GITHUB_RUN_NUMBER)"
|
CHANGES=$( git status --porcelain )
|
||||||
if ! git push origin master --quiet; then
|
|
||||||
git pull origin master
|
if [[ ! -z "${CHANGES}" ]]; then
|
||||||
git push origin master --quiet
|
dateAndMonth=$( date "+%D %T" )
|
||||||
|
git commit -m "CI update: ${dateAndMonth} (Build ${GITHUB_RUN_NUMBER})"
|
||||||
|
if ! git push origin master --quiet; then
|
||||||
|
git pull origin master
|
||||||
|
git push origin master --quiet
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
Reference in New Issue
Block a user