Compare commits
65 Commits
1.77.1.230
...
1.81.1.232
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9468e97c13 | ||
|
|
a631bc594c | ||
|
|
13a608979c | ||
|
|
025a078b3b | ||
|
|
f51c90526f | ||
|
|
61e44afbc4 | ||
|
|
63dc9d739b | ||
|
|
1e41cef8a6 | ||
|
|
b9cfdf370d | ||
|
|
a8262e5152 | ||
|
|
d468b7a1e0 | ||
|
|
0b2fc64a3b | ||
|
|
8dcc87596b | ||
|
|
0810ba2404 | ||
|
|
79baded01d | ||
|
|
17f154098d | ||
|
|
1c0c30e6d6 | ||
|
|
06e05f233a | ||
|
|
b4318d78a0 | ||
|
|
3e1420722c | ||
|
|
9a210dc964 | ||
|
|
11083b9a1b | ||
|
|
d6b7880a05 | ||
|
|
3fa7f2179b | ||
|
|
d06d8127d5 | ||
|
|
02d21f5264 | ||
|
|
7710a09830 | ||
|
|
599eb2adc9 | ||
|
|
e8161f6e4f | ||
|
|
31b5e5b919 | ||
|
|
ff05d093c9 | ||
|
|
08114ab943 | ||
|
|
a17ae154cc | ||
|
|
272566cc25 | ||
|
|
d3db3c1f52 | ||
|
|
bd8b0d5920 | ||
|
|
aac82d75f4 | ||
|
|
c66d9b7edc | ||
|
|
73f7d062da | ||
|
|
c9b8e2f5a5 | ||
|
|
6f03ab0ba1 | ||
|
|
fad378871b | ||
|
|
3050fad108 | ||
|
|
f7fc439526 | ||
|
|
7c294be474 | ||
|
|
dfa2100471 | ||
|
|
443107bfa5 | ||
|
|
2af05c9f5b | ||
|
|
4b237cbd3c | ||
|
|
b11613470e | ||
|
|
b019f9c25a | ||
|
|
e2bf570707 | ||
|
|
a2aed6a9e7 | ||
|
|
dc1e3961c3 | ||
|
|
272f67d95b | ||
|
|
7afbfe03ad | ||
|
|
94ab319d86 | ||
|
|
6137a9fcc5 | ||
|
|
8661322052 | ||
|
|
84aabe12e3 | ||
|
|
99da974ce5 | ||
|
|
033a6bdf30 | ||
|
|
9dbdd411a0 | ||
|
|
31a42d485b | ||
|
|
89d3113d66 |
48
.github/workflows/insider-linux.yml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
new_release:
|
||||
type: boolean
|
||||
description: Force new Release
|
||||
test_asset_builder:
|
||||
type: boolean
|
||||
description: Test the assets builder
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
push:
|
||||
@@ -51,6 +54,8 @@ jobs:
|
||||
run: ./get_repo.sh
|
||||
|
||||
- name: Check PR or cron
|
||||
env:
|
||||
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
|
||||
run: ./check_cron_or_pr.sh
|
||||
|
||||
dependencies:
|
||||
@@ -68,7 +73,7 @@ jobs:
|
||||
- vscode_arch: x64
|
||||
image: vscodium/vscodium-linux-build-agent:centos7-devtoolset8-x64
|
||||
# - vscode_arch: arm64
|
||||
# image: vscodium/vscodium-linux-build-agent:bionic-x64
|
||||
# image: vscodium/vscodium-linux-build-agent:centos7-devtoolset8-arm64
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
if: needs.check.outputs.SHOULD_BUILD == 'yes' || needs.check.outputs.SHOULD_DEPLOY == 'yes'
|
||||
@@ -82,27 +87,10 @@ jobs:
|
||||
run: ./get_repo.sh
|
||||
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
if: matrix.vscode_arch == 'arm64'
|
||||
if: matrix.vscode_arch == 'arm64' || matrix.vscode_arch == 'ppc64le'
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: Install remote dependencies (x64)
|
||||
env:
|
||||
npm_config_arch: x64
|
||||
- name: Install remote dependencies
|
||||
run: ./install_remote_dependencies.sh
|
||||
if: matrix.vscode_arch == 'x64'
|
||||
|
||||
# - name: Install remote dependencies (arm64)
|
||||
# run: |
|
||||
# set -e
|
||||
# docker run -e VSCODE_QUALITY -e GITHUB_TOKEN -v $(pwd):/root/vscodium vscodium/vscodium-linux-build-agent:centos7-devtoolset8-arm64 /root/vscodium/install_remote_dependencies.sh
|
||||
# if: matrix.vscode_arch == 'arm64'
|
||||
|
||||
- name: Save remote dependencies
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -117,6 +105,7 @@ jobs:
|
||||
- dependencies
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DISABLE_UPDATE: 'yes'
|
||||
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
|
||||
MS_TAG: ${{ needs.check.outputs.MS_TAG }}
|
||||
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
|
||||
@@ -131,10 +120,13 @@ jobs:
|
||||
image: vscodium/vscodium-linux-build-agent:bionic-x64
|
||||
- vscode_arch: arm64
|
||||
npm_arch: arm64
|
||||
image: vscodium/vscodium-linux-build-agent:stretch-arm64
|
||||
image: vscodium/vscodium-linux-build-agent:bionic-arm64
|
||||
- vscode_arch: armhf
|
||||
npm_arch: armv7l
|
||||
image: vscodium/vscodium-linux-build-agent:stretch-armhf
|
||||
npm_arch: arm
|
||||
image: vscodium/vscodium-linux-build-agent:bionic-armhf
|
||||
- vscode_arch: ppc64le
|
||||
npm_arch: ppc64
|
||||
image: vscodium/vscodium-linux-build-agent:bionic-ppc64le
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
env:
|
||||
@@ -156,14 +148,6 @@ jobs:
|
||||
- name: Install GH
|
||||
run: ./install_gh.sh
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: Check existing VSCodium tags/releases
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -186,7 +170,7 @@ jobs:
|
||||
|
||||
- name: Prepare assets
|
||||
run: ./prepare_assets.sh
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
|
||||
9
.github/workflows/insider-macos.yml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
new_release:
|
||||
type: boolean
|
||||
description: Force new Release
|
||||
test_asset_builder:
|
||||
type: boolean
|
||||
description: Test the assets builder
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
push:
|
||||
@@ -50,7 +53,7 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: '16'
|
||||
|
||||
- name: Clone VSCode repo
|
||||
env:
|
||||
@@ -58,6 +61,8 @@ jobs:
|
||||
run: . get_repo.sh
|
||||
|
||||
- name: Check PR or cron
|
||||
env:
|
||||
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
|
||||
run: . check_cron_or_pr.sh
|
||||
|
||||
- name: Check existing VSCodium tags/releases
|
||||
@@ -79,7 +84,7 @@ jobs:
|
||||
CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
|
||||
CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
|
||||
run: ./prepare_assets.sh
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
|
||||
2
.github/workflows/insider-spearhead.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: '16'
|
||||
|
||||
- name: Clone VSCode repo
|
||||
run: . get_repo.sh
|
||||
|
||||
9
.github/workflows/insider-windows.yml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
new_release:
|
||||
type: boolean
|
||||
description: Force new Release
|
||||
test_asset_builder:
|
||||
type: boolean
|
||||
description: Test the assets builder
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
push:
|
||||
@@ -55,7 +58,7 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: '16'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
@@ -71,6 +74,8 @@ jobs:
|
||||
run: ./get_repo.sh
|
||||
|
||||
- name: Check PR or cron
|
||||
env:
|
||||
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
|
||||
run: ./check_cron_or_pr.sh
|
||||
|
||||
- name: Check existing VSCodium tags/releases
|
||||
@@ -90,7 +95,7 @@ jobs:
|
||||
|
||||
- name: Prepare assets
|
||||
run: ./prepare_assets.sh
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
|
||||
48
.github/workflows/stable-linux.yml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
force_version:
|
||||
type: boolean
|
||||
description: Force update version
|
||||
test_asset_builder:
|
||||
type: boolean
|
||||
description: Test the assets builder
|
||||
schedule:
|
||||
- cron: '0 18 * * *'
|
||||
push:
|
||||
@@ -48,6 +51,8 @@ jobs:
|
||||
run: ./get_repo.sh
|
||||
|
||||
- name: Check PR or cron
|
||||
env:
|
||||
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
|
||||
run: ./check_cron_or_pr.sh
|
||||
|
||||
dependencies:
|
||||
@@ -65,7 +70,7 @@ jobs:
|
||||
- vscode_arch: x64
|
||||
image: vscodium/vscodium-linux-build-agent:centos7-devtoolset8-x64
|
||||
# - vscode_arch: arm64
|
||||
# image: vscodium/vscodium-linux-build-agent:bionic-x64
|
||||
# image: vscodium/vscodium-linux-build-agent:centos7-devtoolset8-arm64
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
if: needs.check.outputs.SHOULD_BUILD == 'yes' || needs.check.outputs.SHOULD_DEPLOY == 'yes'
|
||||
@@ -79,27 +84,10 @@ jobs:
|
||||
run: ./get_repo.sh
|
||||
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
if: matrix.vscode_arch == 'arm64'
|
||||
if: matrix.vscode_arch == 'arm64' || matrix.vscode_arch == 'ppc64le'
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: Install remote dependencies (x64)
|
||||
env:
|
||||
npm_config_arch: x64
|
||||
- name: Install remote dependencies
|
||||
run: ./install_remote_dependencies.sh
|
||||
if: matrix.vscode_arch == 'x64'
|
||||
|
||||
# - name: Install remote dependencies (arm64)
|
||||
# run: |
|
||||
# set -e
|
||||
# docker run -e VSCODE_QUALITY -e GITHUB_TOKEN -v $(pwd):/root/vscodium vscodium/vscodium-linux-build-agent:centos7-devtoolset8-arm64 /root/vscodium/install_remote_dependencies.sh
|
||||
# if: matrix.vscode_arch == 'arm64'
|
||||
|
||||
- name: Save remote dependencies
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -114,6 +102,7 @@ jobs:
|
||||
- dependencies
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DISABLE_UPDATE: 'yes'
|
||||
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
|
||||
MS_TAG: ${{ needs.check.outputs.MS_TAG }}
|
||||
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
|
||||
@@ -128,10 +117,13 @@ jobs:
|
||||
image: vscodium/vscodium-linux-build-agent:bionic-x64
|
||||
- vscode_arch: arm64
|
||||
npm_arch: arm64
|
||||
image: vscodium/vscodium-linux-build-agent:stretch-arm64
|
||||
image: vscodium/vscodium-linux-build-agent:bionic-arm64
|
||||
- vscode_arch: armhf
|
||||
npm_arch: armv7l
|
||||
image: vscodium/vscodium-linux-build-agent:stretch-armhf
|
||||
npm_arch: arm
|
||||
image: vscodium/vscodium-linux-build-agent:bionic-armhf
|
||||
- vscode_arch: ppc64le
|
||||
npm_arch: ppc64
|
||||
image: vscodium/vscodium-linux-build-agent:bionic-ppc64le
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
env:
|
||||
@@ -151,14 +143,6 @@ jobs:
|
||||
- name: Install GH
|
||||
run: ./install_gh.sh
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: Check existing VSCodium tags/releases
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -181,7 +165,7 @@ jobs:
|
||||
|
||||
- name: Prepare assets
|
||||
run: ./prepare_assets.sh
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
|
||||
9
.github/workflows/stable-macos.yml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
force_version:
|
||||
type: boolean
|
||||
description: Force update version
|
||||
test_asset_builder:
|
||||
type: boolean
|
||||
description: Test the assets builder
|
||||
schedule:
|
||||
- cron: '0 18 * * *'
|
||||
push:
|
||||
@@ -47,12 +50,14 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: '16'
|
||||
|
||||
- name: Clone VSCode repo
|
||||
run: . get_repo.sh
|
||||
|
||||
- name: Check PR or cron
|
||||
env:
|
||||
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
|
||||
run: . check_cron_or_pr.sh
|
||||
|
||||
- name: Check existing VSCodium tags/releases
|
||||
@@ -74,7 +79,7 @@ jobs:
|
||||
CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
|
||||
CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
|
||||
run: ./prepare_assets.sh
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
|
||||
9
.github/workflows/stable-windows.yml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
force_version:
|
||||
type: boolean
|
||||
description: Force update version
|
||||
test_asset_builder:
|
||||
type: boolean
|
||||
description: Test the assets builder
|
||||
schedule:
|
||||
- cron: '0 18 * * *'
|
||||
push:
|
||||
@@ -53,7 +56,7 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: '16'
|
||||
|
||||
- name: Install Yarn
|
||||
run: npm install -g yarn
|
||||
@@ -67,6 +70,8 @@ jobs:
|
||||
run: ./get_repo.sh
|
||||
|
||||
- name: Check PR or cron
|
||||
env:
|
||||
TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
|
||||
run: ./check_cron_or_pr.sh
|
||||
|
||||
- name: Check existing VSCodium tags/releases
|
||||
@@ -86,7 +91,7 @@ jobs:
|
||||
|
||||
- name: Prepare assets
|
||||
run: ./prepare_assets.sh
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
|
||||
|
||||
- name: Release
|
||||
env:
|
||||
|
||||
14
build.sh
@@ -1,17 +1,15 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -ex
|
||||
|
||||
if [ -f "./remote-dependencies.tar" ]; then
|
||||
if [[ -f "./remote-dependencies.tar" ]]; then
|
||||
tar -xf ./remote-dependencies.tar ./vscode/remote/node_modules
|
||||
fi
|
||||
|
||||
. version.sh
|
||||
|
||||
if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||
npm config set scripts-prepend-node-path true
|
||||
npm config set node_gyp
|
||||
|
||||
echo "MS_COMMIT=\"${MS_COMMIT}\""
|
||||
|
||||
. prepare_vscode.sh
|
||||
@@ -29,7 +27,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
|
||||
|
||||
find "../VSCode-darwin-${VSCODE_ARCH}" -exec touch {} \;
|
||||
find "../VSCode-darwin-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
|
||||
|
||||
VSCODE_PLATFORM="darwin"
|
||||
elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||
@@ -42,10 +40,12 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||
fi
|
||||
|
||||
VSCODE_PLATFORM="win32"
|
||||
elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then # linux-ppc64le
|
||||
VSCODE_PLATFORM="linux"
|
||||
else # linux
|
||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
|
||||
|
||||
find "../VSCode-linux-${VSCODE_ARCH}" -exec touch {} \;
|
||||
find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
|
||||
|
||||
VSCODE_PLATFORM="linux"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091,SC2129
|
||||
|
||||
### Windows
|
||||
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build.sh
|
||||
@@ -13,7 +14,7 @@ export SKIP_SOURCE="no"
|
||||
export VSCODE_LATEST="no"
|
||||
export VSCODE_QUALITY="stable"
|
||||
|
||||
while getopts ":ilop" opt; do
|
||||
while getopts ":ilops" opt; do
|
||||
case "$opt" in
|
||||
i)
|
||||
export VSCODE_QUALITY="insider"
|
||||
@@ -30,6 +31,8 @@ while getopts ":ilop" opt; do
|
||||
s)
|
||||
export SKIP_SOURCE="yes"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -49,6 +52,8 @@ UNAME_ARCH=$( uname -m )
|
||||
|
||||
if [[ "${UNAME_ARCH}" == "arm64" ]]; then
|
||||
export VSCODE_ARCH="arm64"
|
||||
elif [[ "${UNAME_ARCH}" == "ppc64le" ]]; then
|
||||
export VSCODE_ARCH="ppc64le"
|
||||
else
|
||||
export VSCODE_ARCH="x64"
|
||||
fi
|
||||
@@ -98,7 +103,8 @@ if [[ "${SKIP_BUILD}" == "no" ]]; then
|
||||
. build.sh
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" && "${VSCODE_LATEST}" == "yes" ]]; then
|
||||
echo "$( cat "insider.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )" > "insider.json"
|
||||
jsonTmp=$( jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. "insider.json" | .tag=$tag | .commit=$commit' )
|
||||
echo "${jsonTmp}" > "insider.json" && unset jsonTmp
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
exists() { type -t "$1" > /dev/null 2>&1; }
|
||||
exists() { type -t "$1" &> /dev/null; }
|
||||
|
||||
export APP_NAME="VSCodium"
|
||||
export CI_BUILD="no"
|
||||
@@ -19,7 +20,9 @@ while getopts ":ilp" opt; do
|
||||
export VSCODE_LATEST="yes"
|
||||
;;
|
||||
p)
|
||||
export SKIP_ASSETS="no"
|
||||
export SKIP_ASSETS="no"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -15,11 +15,11 @@ if [[ "${VSCODE_ARCH}" == "x64" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wget -c "${APPIMAGE_URL}"
|
||||
wget -c "${APPIMAGE_URL}" -O pkg2appimage.AppImage
|
||||
|
||||
chmod +x ./pkg2appimage-*.AppImage
|
||||
chmod +x ./pkg2appimage.AppImage
|
||||
|
||||
./pkg2appimage-*.AppImage --appimage-extract && mv ./squashfs-root ./pkg2appimage.AppDir
|
||||
./pkg2appimage.AppImage --appimage-extract && mv ./squashfs-root ./pkg2appimage.AppDir
|
||||
|
||||
# add update's url
|
||||
sed -i 's/generate_type2_appimage/generate_type2_appimage -u "gh-releases-zsync|VSCodium|vscodium|latest|*.AppImage.zsync"/' pkg2appimage.AppDir/AppRun
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
export VSCODE_QUALITY="stable"
|
||||
|
||||
while getopts ":ilp" opt; do
|
||||
while getopts ":i" opt; do
|
||||
case "$opt" in
|
||||
i)
|
||||
export VSCODE_QUALITY="insider"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
URL=`curl -s "https://update.code.visualstudio.com/api/update/win32-x64-archive/${VSCODE_QUALITY}/VERSION" | jq -c '.url' | sed -E 's/.*"([^"]+)".*/\1/'`
|
||||
URL=$( curl -s "https://update.code.visualstudio.com/api/update/win32-x64-archive/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" | jq -c '.url' | sed -E 's/.*"([^"]+)".*/\1/' )
|
||||
# echo "url: ${URL}"
|
||||
FILE=`echo "${URL}" | sed -E 's|.*/([^/]+\.zip)$|\1|'`
|
||||
FILE="${URL##*/}"
|
||||
# echo "file: ${FILE}"
|
||||
DIRECTORY=`echo "${URL}" | sed -E 's|.*/([^/]+)\.zip$|\1|'`
|
||||
DIRECTORY="${FILE%.zip}"
|
||||
# echo "directory: ${DIRECTORY}"
|
||||
|
||||
if [[ ! -f "${FILE}" ]]; then
|
||||
@@ -28,8 +30,9 @@ if [[ ! -d "${DIRECTORY}" ]]; then
|
||||
unzip "${FILE}" -d "${DIRECTORY}"
|
||||
fi
|
||||
|
||||
APIS=`cat ${DIRECTORY}/resources/app/product.json | jq -r '.extensionEnabledApiProposals'`
|
||||
APIS=$( jq -r '.extensionEnabledApiProposals' "${DIRECTORY}/resources/app/product.json" )
|
||||
|
||||
APIS=`echo "${APIS}" | jq '. += {"jeanp413.open-remote-ssh": ["resolvers", "tunnels", "terminalDataWriteEvent", "contribRemoteHelp", "contribViewsRemote"]}'`
|
||||
APIS=$( echo "${APIS}" | jq '. += {"jeanp413.open-remote-ssh": ["resolvers", "tunnels", "terminalDataWriteEvent", "contribRemoteHelp", "contribViewsRemote"]}' )
|
||||
|
||||
cat <<< $(jq --argjson v "${APIS}" 'setpath(["extensionEnabledApiProposals"]; $v)' product.json) > product.json
|
||||
jsonTmp=$( jq --argjson v "${APIS}" 'setpath(["extensionEnabledApiProposals"]; $v)' product.json )
|
||||
echo "${jsonTmp}" > product.json && unset jsonTmp
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export VSCODE_QUALITY="stable"
|
||||
|
||||
while getopts ":ilp" opt; do
|
||||
while getopts ":i" opt; do
|
||||
case "$opt" in
|
||||
i)
|
||||
export VSCODE_QUALITY="insider"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -16,16 +18,15 @@ git add .
|
||||
git reset -q --hard HEAD
|
||||
|
||||
for FILE in ../patches/*.patch; do
|
||||
if [ -f "${FILE}" ]; then
|
||||
if [[ -f "${FILE}" ]]; then
|
||||
echo applying patch: "${FILE}"
|
||||
git apply --ignore-whitespace "${FILE}"
|
||||
if [ $? -ne 0 ]; then
|
||||
if ! git apply --ignore-whitespace "${FILE}"; then
|
||||
echo failed to apply patch "${FILE}"
|
||||
|
||||
git apply --reject "${FILE}"
|
||||
git apply --reject "../patches/helper/settings.patch"
|
||||
|
||||
read -p "Press any key when the conflict have been resolved..." -n1 -s
|
||||
read -rp "Press any key when the conflict have been resolved..." -n1 -s
|
||||
|
||||
git restore .vscode/settings.json
|
||||
git add .
|
||||
@@ -38,16 +39,15 @@ done
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
for FILE in ../patches/insider/*.patch; do
|
||||
if [ -f "${FILE}" ]; then
|
||||
if [[ -f "${FILE}" ]]; then
|
||||
echo applying patch: "${FILE}"
|
||||
git apply --ignore-whitespace "${FILE}"
|
||||
if [ $? -ne 0 ]; then
|
||||
if ! git apply --ignore-whitespace "${FILE}"; then
|
||||
echo failed to apply patch "${FILE}"
|
||||
|
||||
git apply --reject "${FILE}"
|
||||
git apply --reject "../patches/helper/settings.patch"
|
||||
|
||||
read -p "Press any key when the conflict have been resolved..." -n1 -s
|
||||
read -rp "Press any key when the conflict have been resolved..." -n1 -s
|
||||
|
||||
git restore .vscode/settings.json
|
||||
git add .
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -10,9 +10,8 @@ SCRIPT_DIR=$( pwd )
|
||||
|
||||
cd "../../../VSCode-win32-${VSCODE_ARCH}/resources/app"
|
||||
|
||||
cp product.json product.json.bak
|
||||
cat product.json.bak | jq "del(.updateUrl)" > product.json
|
||||
rm -f product.json.bak
|
||||
jsonTmp=$( jq "del(.updateUrl)" product.json )
|
||||
echo "${jsonTmp}" > product.json && unset jsonTmp
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -11,14 +11,12 @@ WIN_SDK_FULL_VERSION="10.0.17763.0"
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
PRODUCT_NAME="VSCodium - Insiders"
|
||||
PRODUCT_SKU="vscodium-insiders"
|
||||
PRODUCT_CODE="VSCodiumInsiders"
|
||||
PRODUCT_UPGRADE_CODE="1C9B7195-5A9A-43B3-B4BD-583E20498467"
|
||||
ICON_DIR="..\\..\\..\\src\\insider\\resources\\win32"
|
||||
SETUP_RESOURCES_DIR=".\\resources\\insider"
|
||||
else
|
||||
PRODUCT_NAME="VSCodium"
|
||||
PRODUCT_SKU="vscodium"
|
||||
PRODUCT_CODE="VSCodium"
|
||||
PRODUCT_UPGRADE_CODE="965370CD-253C-4720-82FC-2E6B02A53808"
|
||||
ICON_DIR="..\\..\\..\\src\\stable\\resources\\win32"
|
||||
@@ -51,7 +49,7 @@ fi
|
||||
sed -i "s|@@PRODUCT_UPGRADE_CODE@@|${PRODUCT_UPGRADE_CODE}|g" .\\includes\\vscodium-variables.wxi
|
||||
sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g" .\\vscodium.xsl
|
||||
|
||||
find i18n -name '*.wxl' -exec sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g" {} \;
|
||||
find i18n -name '*.wxl' -print0 | xargs -0 sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g"
|
||||
|
||||
BuildSetupTranslationTransform() {
|
||||
local CULTURE=${1}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../../vscode || { echo "'vscode' dir not found"; exit 1; }
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2129
|
||||
|
||||
set -e
|
||||
|
||||
@@ -13,9 +14,16 @@ elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
|
||||
export SHOULD_BUILD="yes"
|
||||
export SHOULD_DEPLOY="no"
|
||||
elif [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
|
||||
echo "It's a Dispatch"
|
||||
if [[ "${TEST_ASSET_BUILDER}" == "true" ]]; then
|
||||
echo "It's testing the assets builder"
|
||||
|
||||
export SHOULD_DEPLOY="yes"
|
||||
export SHOULD_BUILD="yes"
|
||||
export SHOULD_DEPLOY="no"
|
||||
else
|
||||
echo "It's a Dispatch"
|
||||
|
||||
export SHOULD_DEPLOY="yes"
|
||||
fi
|
||||
else
|
||||
echo "It's a Cron"
|
||||
|
||||
@@ -24,7 +32,7 @@ fi
|
||||
|
||||
if [[ "${GITHUB_ENV}" ]]; then
|
||||
echo "GITHUB_BRANCH=${GITHUB_BRANCH}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"
|
||||
echo "VSCODE_QUALITY=${VSCODE_QUALITY}" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2129
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||
echo "Will not build because no GITHUB_TOKEN defined"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
APP_NAME_LC=$( echo "${APP_NAME}" | awk '{print tolower($0)}' )
|
||||
APP_NAME_LC="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )"
|
||||
GITHUB_RESPONSE=$( curl -s -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/${ASSETS_REPOSITORY}/releases/latest" )
|
||||
LATEST_VERSION=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.tag_name' )
|
||||
|
||||
if [[ "${LATEST_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
|
||||
if [ "${MS_TAG}" != "${BASH_REMATCH[1]}" ]; then
|
||||
if [[ "${MS_TAG}" != "${BASH_REMATCH[1]}" ]]; then
|
||||
echo "New VSCode version, new build"
|
||||
export SHOULD_BUILD="yes"
|
||||
elif [[ "${NEW_RELEASE}" == "true" ]]; then
|
||||
@@ -22,7 +23,7 @@ if [[ "${LATEST_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
|
||||
BODY=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.body' )
|
||||
|
||||
if [[ "${BODY}" =~ \[([a-z0-9]+)\] ]]; then
|
||||
if [ "${MS_COMMIT}" != "${BASH_REMATCH[1]}" ]; then
|
||||
if [[ "${MS_COMMIT}" != "${BASH_REMATCH[1]}" ]]; then
|
||||
echo "New VSCode Insiders version, new build"
|
||||
export SHOULD_BUILD="yes"
|
||||
fi
|
||||
@@ -46,7 +47,7 @@ contains() {
|
||||
echo "${ASSETS}" | grep "${1}\""
|
||||
}
|
||||
|
||||
if [ "${ASSETS}" != "null" ]; then
|
||||
if [[ "${ASSETS}" != "null" ]]; then
|
||||
# macos
|
||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
|
||||
@@ -282,6 +283,24 @@ if [ "${ASSETS}" != "null" ]; then
|
||||
echo "Already have all the Linux arm builds"
|
||||
fi
|
||||
|
||||
# linux-ppc64le
|
||||
elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
|
||||
SHOULD_BUILD_DEB="no"
|
||||
SHOULD_BUILD_APPIMAGE="no"
|
||||
SHOULD_BUILD_RPM="no"
|
||||
SHOULD_BUILD_TAR="no"
|
||||
|
||||
if [[ -z $( contains "${APP_NAME_LC}-reh-linux-ppc64le-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
||||
echo "Building on Linux PowerPC64LE because we have no REH archive"
|
||||
export SHOULD_BUILD="yes"
|
||||
else
|
||||
export SHOULD_BUILD_REH="no"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||
echo "Already have all the Linux PowerPC64LE builds"
|
||||
fi
|
||||
|
||||
# linux-x64
|
||||
else
|
||||
if [[ -z $( contains "amd64.deb" ) ]]; then
|
||||
@@ -326,7 +345,12 @@ if [ "${ASSETS}" != "null" ]; then
|
||||
fi
|
||||
else
|
||||
if [[ "${OS_NAME}" == "linux" ]]; then
|
||||
if [[ "${VSCODE_ARCH}" != "x64" ]]; then
|
||||
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
|
||||
SHOULD_BUILD_DEB="no"
|
||||
SHOULD_BUILD_APPIMAGE="no"
|
||||
SHOULD_BUILD_RPM="no"
|
||||
SHOULD_BUILD_TAR="no"
|
||||
elif [[ "${VSCODE_ARCH}" != "x64" ]]; then
|
||||
export SHOULD_BUILD_APPIMAGE="no"
|
||||
fi
|
||||
elif [[ "${OS_NAME}" == "osx" ]]; then
|
||||
@@ -343,6 +367,7 @@ else
|
||||
export SHOULD_BUILD="yes"
|
||||
fi
|
||||
|
||||
|
||||
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}"
|
||||
|
||||
@@ -83,31 +83,20 @@ docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodi
|
||||
|
||||
When inside the container, you can use the following commands to build:
|
||||
```
|
||||
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs desktop-file-utils
|
||||
|
||||
npm install -g yarn
|
||||
|
||||
cd /root/vscodium
|
||||
|
||||
. get_repo.sh
|
||||
|
||||
export SHOULD_BUILD=yes
|
||||
export OS_NAME=linux
|
||||
export VSCODE_ARCH=x64
|
||||
|
||||
. build.sh
|
||||
./build/build.sh
|
||||
```
|
||||
|
||||
### <a id="build-docker-arm32"></a>ARM 32bits
|
||||
|
||||
Firstly, create the container with:
|
||||
```
|
||||
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
|
||||
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-armhf bash
|
||||
```
|
||||
like
|
||||
```
|
||||
docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
|
||||
docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-armhf bash
|
||||
```
|
||||
|
||||
When inside the container, you can use the following commands to build:
|
||||
@@ -117,15 +106,7 @@ sudo apt-get install -y nodejs desktop-file-utils
|
||||
|
||||
cd /root/vscodium
|
||||
|
||||
. get_repo.sh
|
||||
|
||||
export SHOULD_BUILD=yes
|
||||
export OS_NAME=linux
|
||||
export VSCODE_ARCH=armhf
|
||||
export npm_config_arch=armv7l
|
||||
export npm_config_force_process_config="true"
|
||||
|
||||
. build.sh
|
||||
./build/build.sh
|
||||
```
|
||||
|
||||
## <a id="build-snap"></a>Build Snap
|
||||
|
||||
51
get_repo.sh
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2129
|
||||
|
||||
set -e
|
||||
|
||||
@@ -10,30 +11,30 @@ fi
|
||||
if [[ -z "${RELEASE_VERSION}" ]]; then
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "insider.json" ]]; then
|
||||
UPDATE_INFO=$( curl --silent https://update.code.visualstudio.com/api/update/darwin/insider/lol )
|
||||
UPDATE_INFO=$( curl --silent --fail https://update.code.visualstudio.com/api/update/darwin/insider/0000000000000000000000000000000000000000 )
|
||||
else
|
||||
export MS_COMMIT=$(jq -r '.commit' insider.json)
|
||||
export MS_TAG=$(jq -r '.tag' insider.json)
|
||||
MS_COMMIT=$( jq -r '.commit' insider.json )
|
||||
MS_TAG=$( jq -r '.tag' insider.json )
|
||||
fi
|
||||
else
|
||||
UPDATE_INFO=$( curl --silent https://update.code.visualstudio.com/api/update/darwin/stable/lol )
|
||||
UPDATE_INFO=$( curl --silent --fail https://update.code.visualstudio.com/api/update/darwin/stable/0000000000000000000000000000000000000000 )
|
||||
fi
|
||||
|
||||
if [[ -z "${MS_COMMIT}" ]]; then
|
||||
export MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||
export MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||
MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||
MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
export MS_TAG="${MS_TAG/\-insider/}"
|
||||
MS_TAG="${MS_TAG/\-insider/}"
|
||||
fi
|
||||
fi
|
||||
|
||||
date=$( date +%Y%j )
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
export RELEASE_VERSION="${MS_TAG}.${date: -5}-insider"
|
||||
RELEASE_VERSION="${MS_TAG}.${date: -5}-insider"
|
||||
else
|
||||
export RELEASE_VERSION="${MS_TAG}.${date: -5}"
|
||||
RELEASE_VERSION="${MS_TAG}.${date: -5}"
|
||||
fi
|
||||
else
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
@@ -41,14 +42,14 @@ else
|
||||
then
|
||||
MS_TAG="${BASH_REMATCH[1]}"
|
||||
else
|
||||
echo "Bad RELEASE_VERSION: ${RELEASE_VERSION}"
|
||||
echo "Error: Bad RELEASE_VERSION: ${RELEASE_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${MS_TAG}" == "$(jq -r '.tag' insider.json)" ]]; then
|
||||
export MS_COMMIT=$(jq -r '.commit' insider.json)
|
||||
if [[ "${MS_TAG}" == "$( jq -r '.tag' insider.json )" ]]; then
|
||||
MS_COMMIT=$( jq -r '.commit' insider.json )
|
||||
else
|
||||
echo "No MS_COMMIT for ${RELEASE_VERSION}"
|
||||
echo "Error: No MS_COMMIT for ${RELEASE_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
@@ -56,7 +57,7 @@ else
|
||||
then
|
||||
MS_TAG="${BASH_REMATCH[1]}"
|
||||
else
|
||||
echo "Bad RELEASE_VERSION: ${RELEASE_VERSION}"
|
||||
echo "Error: Bad RELEASE_VERSION: ${RELEASE_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -73,23 +74,23 @@ git remote add origin https://github.com/Microsoft/vscode.git
|
||||
# figure out latest tag by calling MS update API
|
||||
if [[ -z "${MS_TAG}" ]]; then
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
UPDATE_INFO=$( curl --silent https://update.code.visualstudio.com/api/update/darwin/insider/lol )
|
||||
UPDATE_INFO=$( curl --silent --fail https://update.code.visualstudio.com/api/update/darwin/insider/0000000000000000000000000000000000000000 )
|
||||
else
|
||||
UPDATE_INFO=$( curl --silent https://update.code.visualstudio.com/api/update/darwin/stable/lol )
|
||||
UPDATE_INFO=$( curl --silent --fail https://update.code.visualstudio.com/api/update/darwin/stable/0000000000000000000000000000000000000000 )
|
||||
fi
|
||||
export MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||
export MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||
MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||
MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||
elif [[ -z "${MS_COMMIT}" ]]; then
|
||||
REFERENCE=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
|
||||
|
||||
if [[ -z "${REFERENCE}" ]]; then
|
||||
echo "The following tag can't be found: ${MS_TAG}"
|
||||
echo "Error: The following tag can't be found: ${MS_TAG}"
|
||||
exit 1
|
||||
elif [[ "${REFERENCE}" =~ ^([[:alnum:]]+)[[:space:]]+refs\/tags\/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
|
||||
export MS_COMMIT="${BASH_REMATCH[1]}"
|
||||
export MS_TAG="${BASH_REMATCH[2]}"
|
||||
MS_COMMIT="${BASH_REMATCH[1]}"
|
||||
MS_TAG="${BASH_REMATCH[2]}"
|
||||
else
|
||||
echo "The following reference can't be parsed: ${REFERENCE}"
|
||||
echo "Error: The following reference can't be parsed: ${REFERENCE}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -108,3 +109,7 @@ if [[ "${GITHUB_ENV}" ]]; then
|
||||
echo "MS_COMMIT=${MS_COMMIT}" >> "${GITHUB_ENV}"
|
||||
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
|
||||
export MS_TAG
|
||||
export MS_COMMIT
|
||||
export RELEASE_VERSION
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
@@ -6,22 +7,24 @@ set -e
|
||||
# set -o xtrace
|
||||
|
||||
QUALITY="stable"
|
||||
COLOR="blue1"
|
||||
|
||||
while getopts ":i" opt; do
|
||||
case "$opt" in
|
||||
i)
|
||||
export QUALITY="insider"
|
||||
export COLOR="orange1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
check_programs() { # {{{
|
||||
for arg in "$@"
|
||||
do
|
||||
if ! command -v "${arg}" >/dev/null 2>&1
|
||||
then
|
||||
for arg in "$@"; do
|
||||
if ! command -v "${arg}" &> /dev/null; then
|
||||
echo "${arg} could not be found"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
} # }}}
|
||||
@@ -34,7 +37,7 @@ SRC_PREFIX=""
|
||||
VSCODE_PREFIX=""
|
||||
|
||||
build_darwin_main() { # {{{
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/darwin/code.icns" ]; then
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/darwin/code.icns" ]]; then
|
||||
rsvg-convert -w 655 -h 655 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite "code_logo.png" -gravity center "icons/template_macos.png" "code_1024.png"
|
||||
convert "code_1024.png" -resize 512x512 code_512.png
|
||||
@@ -50,12 +53,11 @@ build_darwin_main() { # {{{
|
||||
build_darwin_types() { # {{{
|
||||
rsvg-convert -w 128 -h 128 "icons/${QUALITY}/codium_cnl_w80_b8.svg" -o "code_logo.png"
|
||||
|
||||
for file in "${VSCODE_PREFIX}"vscode/resources/darwin/*
|
||||
do
|
||||
if [ -f "${file}" ]; then
|
||||
for file in "${VSCODE_PREFIX}"vscode/resources/darwin/*; do
|
||||
if [[ -f "${file}" ]]; then
|
||||
name=$(basename "${file}" '.icns')
|
||||
|
||||
if [[ ${name} != 'code' ]] && [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/darwin/${name}.icns" ]; then
|
||||
if [[ "${name}" != 'code' ]] && [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/darwin/${name}.icns" ]]; then
|
||||
icns2png -x -s 512x512 "${file}" -o .
|
||||
|
||||
composite -blend 100% -geometry +323+365 "icons/corner_512.png" "${name}_512x512x32.png" "${name}.png"
|
||||
@@ -74,48 +76,62 @@ build_darwin_types() { # {{{
|
||||
} # }}}
|
||||
|
||||
build_linux_main() { # {{{
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png" ]; then
|
||||
convert -size 1024x1024 canvas:transparent PNG32:"code_1024.png"
|
||||
rsvg-convert -w 846 -h 824 "icons/${QUALITY}/codium_clt.svg" -o "code_logo.png"
|
||||
composite "code_logo.png" -gravity center -background none "code_1024.png" "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png"
|
||||
|
||||
rm code_1024.png code_logo.png
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png" ]]; then
|
||||
wget "https://raw.githubusercontent.com/VSCodium/icons/main/icons/linux/circle1/${COLOR}/paulo22s.png" -O "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png"
|
||||
fi
|
||||
|
||||
mkdir -p "${SRC_PREFIX}src/${QUALITY}/resources/linux/rpm"
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/linux/rpm/code.xpm" ]; then
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/linux/rpm/code.xpm" ]]; then
|
||||
convert "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png" "${SRC_PREFIX}src/${QUALITY}/resources/linux/rpm/code.xpm"
|
||||
fi
|
||||
} # }}}
|
||||
|
||||
build_media() { # {{{
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/src/vs/workbench/browser/media/code-icon.svg" ]; then
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/src/vs/workbench/browser/media/code-icon.svg" ]]; then
|
||||
cp "icons/${QUALITY}/codium_clt.svg" "${SRC_PREFIX}src/${QUALITY}/src/vs/workbench/browser/media/code-icon.svg"
|
||||
gsed -i 's|width="100" height="100"|width="1024" height="1024"|' "${SRC_PREFIX}src/${QUALITY}/src/vs/workbench/browser/media/code-icon.svg"
|
||||
fi
|
||||
} # }}}
|
||||
|
||||
build_windows_main() { # {{{
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code.ico" ]; then
|
||||
rsvg-convert -w 1024 -h 1024 "icons/${QUALITY}/codium_clt.svg" -o "code_logo.png"
|
||||
convert "code_logo.png" -define icon:auto-resize=256,128,96,64,48,32,24,20,16 "${SRC_PREFIX}src/${QUALITY}/resources/win32/code.ico"
|
||||
|
||||
rm code_logo.png
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code.ico" ]]; then
|
||||
wget "https://raw.githubusercontent.com/VSCodium/icons/main/icons/win32/nobg/${COLOR}/paulo22s.ico" -O "${SRC_PREFIX}src/${QUALITY}/resources/win32/code.ico"
|
||||
fi
|
||||
} # }}}
|
||||
|
||||
build_windows_type() {
|
||||
local FILE_PATH IMG_SIZE IMG_BG_COLOR LOGO_SIZE GRAVITY
|
||||
|
||||
FILE_PATH="$1"
|
||||
IMG_SIZE="$2"
|
||||
IMG_BG_COLOR="$3"
|
||||
LOGO_SIZE="$4"
|
||||
GRAVITY="$5"
|
||||
|
||||
if [[ ! -f "${FILE_PATH}" ]]; then
|
||||
if [[ "${FILE_PATH##*.}" == "png" ]]; then
|
||||
convert -size "${IMG_SIZE}" "${IMG_BG_COLOR}" PNG32:"${FILE_PATH}"
|
||||
else
|
||||
convert -size "${IMG_SIZE}" "${IMG_BG_COLOR}" "${FILE_PATH}"
|
||||
fi
|
||||
|
||||
rsvg-convert -w "${LOGO_SIZE}" -h "${LOGO_SIZE}" "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
|
||||
composite -gravity "${GRAVITY}" "code_logo.png" "${FILE_PATH}" "${FILE_PATH}"
|
||||
fi
|
||||
}
|
||||
|
||||
build_windows_types() { # {{{
|
||||
mkdir -p "${SRC_PREFIX}src/${QUALITY}/resources/win32"
|
||||
|
||||
rsvg-convert -b "#F5F6F7" -w 64 -h 64 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
|
||||
for file in "${VSCODE_PREFIX}"vscode/resources/win32/*.ico
|
||||
do
|
||||
if [ -f "${file}" ]; then
|
||||
for file in "${VSCODE_PREFIX}"vscode/resources/win32/*.ico; do
|
||||
if [[ -f "${file}" ]]; then
|
||||
name=$(basename "${file}" '.ico')
|
||||
|
||||
if [[ ${name} != 'code' ]] && [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/${name}.ico" ]; then
|
||||
if [[ "${name}" != 'code' ]] && [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/${name}.ico" ]]; then
|
||||
icotool -x -w 256 "${file}"
|
||||
|
||||
composite -geometry +150+185 "code_logo.png" "${name}_9_256x256x32.png" "${name}.png"
|
||||
@@ -127,105 +143,29 @@ build_windows_types() { # {{{
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" ]; then
|
||||
convert -size 70x70 canvas:transparent PNG32:"${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png"
|
||||
rsvg-convert -w 45 -h 45 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png"
|
||||
fi
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png" ]; then
|
||||
convert -size 150x150 canvas:transparent PNG32:"${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png"
|
||||
rsvg-convert -w 64 -h 64 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -geometry +44+25 "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png"
|
||||
fi
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp" ]; then
|
||||
convert -size 164x314 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp"
|
||||
rsvg-convert -w 126 -h 126 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp" ]; then
|
||||
convert -size 192x386 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp"
|
||||
rsvg-convert -w 147 -h 147 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp" ]; then
|
||||
convert -size 246x459 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp"
|
||||
rsvg-convert -w 190 -h 190 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp" ]; then
|
||||
convert -size 273x556 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp"
|
||||
rsvg-convert -w 211 -h 211 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp" ]; then
|
||||
convert -size 328x604 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp"
|
||||
rsvg-convert -w 255 -h 255 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp" ]; then
|
||||
convert -size 355x700 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp"
|
||||
rsvg-convert -w 273 -h 273 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp" ]; then
|
||||
convert -size 410x797 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp"
|
||||
rsvg-convert -w 317 -h 317 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp"
|
||||
fi
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp" ]; then
|
||||
convert -size 55x55 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp"
|
||||
rsvg-convert -w 44 -h 44 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp" ]; then
|
||||
convert -size 64x68 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp"
|
||||
rsvg-convert -w 52 -h 52 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp" ]; then
|
||||
convert -size 83x80 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp"
|
||||
rsvg-convert -w 63 -h 63 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp" ]; then
|
||||
convert -size 92x97 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp"
|
||||
rsvg-convert -w 76 -h 76 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp" ]; then
|
||||
convert -size 110x106 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp"
|
||||
rsvg-convert -w 86 -h 86 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp" ]; then
|
||||
convert -size 119x123 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp"
|
||||
rsvg-convert -w 103 -h 103 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp" ]; then
|
||||
convert -size 138x140 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp"
|
||||
rsvg-convert -w 116 -h 116 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp" ]; then
|
||||
convert -size 493x58 xc:white "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp"
|
||||
rsvg-convert -w 50 -h 50 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -geometry +438+6 "code_logo.png" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp" ]; then
|
||||
convert -size 493x312 xc:white "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp"
|
||||
rsvg-convert -w 120 -h 120 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -geometry +22+152 "code_logo.png" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp"
|
||||
fi
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" "70x70" "canvas:transparent" "45" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png" "150x150" "canvas:transparent" "64" "+44+25"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp" "164x314" "xc:white" "126" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp" "192x386" "xc:white" "147" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp" "246x459" "xc:white" "190" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp" "273x556" "xc:white" "211" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp" "328x604" "xc:white" "255" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp" "355x700" "xc:white" "273" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp" "410x797" "xc:white" "317" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp" "55x55" "xc:white" "44" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp" "64x68" "xc:white" "52" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp" "83x80" "xc:white" "63" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp" "92x97" "xc:white" "76" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp" "110x106" "xc:white" "86" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp" "119x123" "xc:white" "103" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp" "138x140" "xc:white" "116" "center"
|
||||
build_windows_type "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp" "493x58" "xc:white" "50" "+438+6"
|
||||
build_windows_type "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp" "493x312" "xc:white" "120" "+22+152"
|
||||
|
||||
rm code_logo.png
|
||||
} # }}}
|
||||
|
||||
if [ "${0}" == "${BASH_SOURCE}" ];
|
||||
then
|
||||
if [[ "${0}" == "${BASH_SOURCE[0]}" ]]; then
|
||||
build_darwin_main
|
||||
build_linux_main
|
||||
build_windows_main
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
{
|
||||
"tag": "1.78.0",
|
||||
"commit": "f31dffc7f9b93a1cdef21243ec30dea7d489a615"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
GH_ARCH="amd64"
|
||||
|
||||
VERSION=`curl --retry 12 --retry-delay 30 "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-`
|
||||
VERSION=$( curl --retry 12 --retry-delay 30 "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2- )
|
||||
|
||||
curl --retry 12 --retry-delay 120 -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"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
4
patch.sh
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ "${1}" == *patch ]]; then
|
||||
FILE="../patches/${1}"
|
||||
@@ -17,7 +17,7 @@ fi
|
||||
|
||||
git apply --reject "../patches/helper/settings.patch"
|
||||
|
||||
read -p "Press any key when the conflict have been resolved..." -n1 -s
|
||||
read -rp "Press any key when the conflict have been resolved..." -n1 -s
|
||||
|
||||
git restore .vscode/settings.json
|
||||
|
||||
|
||||
1066
patches/brand.patch
Normal file
@@ -1,41 +1,41 @@
|
||||
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
|
||||
index f3cdbff..ac7c39b 100644
|
||||
index 2a0c236..9fea722 100644
|
||||
--- a/build/gulpfile.reh.js
|
||||
+++ b/build/gulpfile.reh.js
|
||||
@@ -246,4 +246,5 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
@@ -250,4 +250,5 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
const name = product.nameShort;
|
||||
+ const release = packageJson.release;
|
||||
const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
|
||||
- .pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined }));
|
||||
+ .pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined }));
|
||||
|
||||
@@ -252,3 +253,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
@@ -256,3 +257,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
const productJsonStream = gulp.src(['product.json'], { base: '.' })
|
||||
- .pipe(json({ commit, date, version }));
|
||||
+ .pipe(json({ commit, date, version, release }));
|
||||
|
||||
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
||||
index cdc802b..49ab315 100644
|
||||
index 0ca2cfd..3fb21d5 100644
|
||||
--- a/build/gulpfile.vscode.js
|
||||
+++ b/build/gulpfile.vscode.js
|
||||
@@ -227,3 +227,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
@@ -225,3 +225,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
|
||||
- let version = packageJson.version;
|
||||
+ let version = packageJson.version
|
||||
const quality = product.quality;
|
||||
@@ -235,3 +235,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
@@ -233,3 +233,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
const name = product.nameShort;
|
||||
- const packageJsonUpdates = { name, version };
|
||||
+ const release = packageJson.release;
|
||||
+ const packageJsonUpdates = { name, version, release };
|
||||
|
||||
@@ -246,3 +247,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
@@ -244,3 +245,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
const date = new Date().toISOString();
|
||||
- const productJsonUpdate = { commit, date, checksums, version };
|
||||
+ const productJsonUpdate = { commit, date, checksums, version, release };
|
||||
|
||||
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
|
||||
index cdc8870..f6e4e09 100644
|
||||
index 90f75cc..275c958 100644
|
||||
--- a/build/gulpfile.vscode.linux.js
|
||||
+++ b/build/gulpfile.vscode.linux.js
|
||||
@@ -25,4 +25,2 @@ const commit = getVersion(root);
|
||||
@@ -60,7 +60,7 @@ index cdc8870..f6e4e09 100644
|
||||
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
|
||||
// Possible run-on values https://snapcraft.io/docs/architectures
|
||||
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
|
||||
index 0d3abda..2606af5 100644
|
||||
index 6e9a6f3..9d80b6b 100644
|
||||
--- a/build/gulpfile.vscode.win32.js
|
||||
+++ b/build/gulpfile.vscode.win32.js
|
||||
@@ -94,4 +94,4 @@ function buildWin32Setup(arch, target) {
|
||||
@@ -71,7 +71,7 @@ index 0d3abda..2606af5 100644
|
||||
+ RawVersion: `${pkg.version.replace(/-\w+$/, '')}.${pkg.release}`,
|
||||
NameVersion: product.win32NameVersion + (target === 'user' ? ' (User)' : ''),
|
||||
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
|
||||
index 61659d2..5cafa06 100644
|
||||
index 06b8549..3af1f45 100644
|
||||
--- a/resources/linux/rpm/code.spec.template
|
||||
+++ b/resources/linux/rpm/code.spec.template
|
||||
@@ -2,3 +2,3 @@ Name: @@NAME@@
|
||||
@@ -80,24 +80,24 @@ index 61659d2..5cafa06 100644
|
||||
+Release: el7
|
||||
Summary: Code editing. Redefined.
|
||||
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
|
||||
index 7ec238b..9295018 100644
|
||||
index ac9cd5d..87b6105 100644
|
||||
--- a/src/vs/base/common/product.ts
|
||||
+++ b/src/vs/base/common/product.ts
|
||||
@@ -34,2 +34,3 @@ export interface IProductConfiguration {
|
||||
@@ -58,2 +58,3 @@ export interface IProductConfiguration {
|
||||
readonly version: string;
|
||||
+ readonly release: string;
|
||||
readonly date?: string;
|
||||
diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts
|
||||
index 561966b..30814a0 100644
|
||||
index 0be311f..d6c4a18 100644
|
||||
--- a/src/vs/platform/diagnostics/node/diagnosticsService.ts
|
||||
+++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts
|
||||
@@ -236,3 +236,3 @@ export class DiagnosticsService implements IDiagnosticsService {
|
||||
@@ -224,3 +224,3 @@ export class DiagnosticsService implements IDiagnosticsService {
|
||||
const output: string[] = [];
|
||||
- output.push(`Version: ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
|
||||
+ output.push(`Version: ${this.productService.nameShort} ${this.productService.version} ${this.productService.release || 'Release unknown'} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
|
||||
output.push(`OS Version: ${osLib.type()} ${osLib.arch()} ${osLib.release()}`);
|
||||
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
||||
index ef798fa..cfa7866 100644
|
||||
index 51a55e1..26dfe7b 100644
|
||||
--- a/src/vs/platform/product/common/product.ts
|
||||
+++ b/src/vs/platform/product/common/product.ts
|
||||
@@ -43,6 +43,7 @@ else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
|
||||
@@ -111,19 +111,19 @@ index ef798fa..cfa7866 100644
|
||||
+ release: pkg.release
|
||||
});
|
||||
diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
|
||||
index 6a3768d..023eeed 100644
|
||||
index 4b320bb..6619c75 100644
|
||||
--- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
|
||||
+++ b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
|
||||
@@ -21,2 +21,3 @@ import { MarkdownRenderer } from 'vs/editor/contrib/markdownRenderer/browser/mar
|
||||
import { defaultButtonStyles, defaultCheckboxStyles, defaultDialogStyles, defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
@@ -22,2 +22,3 @@ import { defaultButtonStyles, defaultCheckboxStyles, defaultDialogStyles, defaul
|
||||
import { ResultKind } from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
+import { getReleaseString } from 'vs/workbench/common/release';
|
||||
|
||||
@@ -147,2 +148,4 @@ export class BrowserDialogHandler implements IDialogHandler {
|
||||
@@ -79,2 +80,4 @@ export class BrowserDialogHandler extends AbstractDialogHandler {
|
||||
const detailString = (useAgo: boolean): string => {
|
||||
+ const releaseString = getReleaseString();
|
||||
+
|
||||
return localize('aboutDetail',
|
||||
@@ -153,3 +156,3 @@ export class BrowserDialogHandler implements IDialogHandler {
|
||||
@@ -85,3 +88,3 @@ export class BrowserDialogHandler extends AbstractDialogHandler {
|
||||
navigator.userAgent
|
||||
- );
|
||||
+ ).replace('\n', `\n${releaseString} ${this.productService.release || 'Unknown'}\n`);
|
||||
@@ -148,28 +148,20 @@ index 0000000..2a8ea57
|
||||
+export function getReleaseString(): string {
|
||||
+ return LABELS[language] ?? DEFAULT_LABEL;
|
||||
+}
|
||||
diff --git a/src/vs/workbench/contrib/issue/browser/issueService.ts b/src/vs/workbench/contrib/issue/browser/issueService.ts
|
||||
index dc7430b..23def01 100644
|
||||
--- a/src/vs/workbench/contrib/issue/browser/issueService.ts
|
||||
+++ b/src/vs/workbench/contrib/issue/browser/issueService.ts
|
||||
@@ -67,2 +67,3 @@ export class WebIssueService implements IWorkbenchIssueService {
|
||||
Version: ${this.productService.version}
|
||||
+Release: ${this.productService.release ?? 'unknown'}
|
||||
Commit: ${this.productService.commit ?? 'unknown'}
|
||||
diff --git a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
|
||||
index f63b75f..2b77c1b 100644
|
||||
index 575bde3..f427833 100644
|
||||
--- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
|
||||
+++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
|
||||
@@ -17,2 +17,3 @@ import { IProductService } from 'vs/platform/product/common/productService';
|
||||
@@ -14,2 +14,3 @@ import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { process } from 'vs/base/parts/sandbox/electron-sandbox/globals';
|
||||
+import { getReleaseString } from 'vs/workbench/common/release';
|
||||
|
||||
@@ -166,2 +167,3 @@ export class NativeDialogHandler implements IDialogHandler {
|
||||
@@ -77,2 +78,3 @@ export class NativeDialogHandler extends AbstractDialogHandler {
|
||||
const osProps = await this.nativeHostService.getOSProperties();
|
||||
+ const releaseString = getReleaseString();
|
||||
|
||||
@@ -179,3 +181,3 @@ export class NativeDialogHandler implements IDialogHandler {
|
||||
process.sandboxed ? 'Yes' : 'No' // TODO@bpasero remove me once sandbox is final
|
||||
@@ -89,3 +91,3 @@ export class NativeDialogHandler extends AbstractDialogHandler {
|
||||
`${osProps.type} ${osProps.arch} ${osProps.release}${isLinuxSnap ? ' snap' : ''}`
|
||||
- );
|
||||
+ ).replace('\n', `\n${releaseString} ${this.productService.release || 'Unknown'}\n`);
|
||||
};
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
|
||||
index 81ba509..59041e2 100644
|
||||
--- a/build/gulpfile.vscode.win32.js
|
||||
+++ b/build/gulpfile.vscode.win32.js
|
||||
@@ -137,7 +137,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,8 +1,8 @@
|
||||
diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts
|
||||
index 3ef5ca1..a634a9f 100644
|
||||
index 8c2aa42..18b0975 100644
|
||||
--- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts
|
||||
+++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution.ts
|
||||
@@ -301,2 +301,8 @@ configurationRegistry.registerConfiguration({
|
||||
@@ -300,2 +300,8 @@ configurationRegistry.registerConfiguration({
|
||||
},
|
||||
+ 'workbench.welcomePage.extraAnnouncements': {
|
||||
+ scope: ConfigurationScope.MACHINE,
|
||||
@@ -12,10 +12,10 @@ index 3ef5ca1..a634a9f 100644
|
||||
+ },
|
||||
'workbench.startupEditor': {
|
||||
diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||
index 46949b2..174e65f 100644
|
||||
index 9dd5330..9e2b6a2 100644
|
||||
--- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||
+++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||
@@ -118,4 +118,8 @@ type GettingStartedActionEvent = {
|
||||
@@ -117,4 +117,8 @@ type GettingStartedActionEvent = {
|
||||
type RecentEntry = (IRecentFolder | IRecentWorkspace) & { id: string };
|
||||
+type AnnouncementEntry = { id: string, title: string, url: string };
|
||||
|
||||
@@ -24,26 +24,26 @@ index 46949b2..174e65f 100644
|
||||
+const BUILTIN_ANNOUNCEMENTS: AnnouncementEntry[] = [/* BUILTIN_ANNOUNCEMENTS */];
|
||||
+
|
||||
export class GettingStartedPage extends EditorPane {
|
||||
@@ -152,2 +156,4 @@ export class GettingStartedPage extends EditorPane {
|
||||
@@ -153,2 +157,4 @@ export class GettingStartedPage extends EditorPane {
|
||||
private gettingStartedList?: GettingStartedIndexList<IResolvedWalkthrough>;
|
||||
+ private announcementList?: GettingStartedIndexList<AnnouncementEntry>;
|
||||
+ private announcementData?: AnnouncementEntry[];
|
||||
private featuredExtensionsList?: GettingStartedIndexList<IFeaturedExtension>;
|
||||
@@ -804,2 +810,3 @@ export class GettingStartedPage extends EditorPane {
|
||||
@@ -774,2 +780,3 @@ export class GettingStartedPage extends EditorPane {
|
||||
const gettingStartedList = this.buildGettingStartedWalkthroughsList();
|
||||
+ const announcementList = await this.buildAnnouncementList();
|
||||
|
||||
@@ -815,3 +822,3 @@ export class GettingStartedPage extends EditorPane {
|
||||
@@ -784,3 +791,3 @@ export class GettingStartedPage extends EditorPane {
|
||||
this.container.classList.remove('noWalkthroughs');
|
||||
- reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
||||
+ reset(leftColumn, startList.getDomElement(), recentList.getDomElement(), announcementList.getDomElement());
|
||||
reset(rightColumn, featuredExtensionList.getDomElement(), gettingStartedList.getDomElement());
|
||||
@@ -820,3 +827,3 @@ export class GettingStartedPage extends EditorPane {
|
||||
- reset(rightColumn, featuredExtensionList.getDomElement(), gettingStartedList.getDomElement());
|
||||
+ reset(rightColumn, featuredExtensionList.getDomElement(), gettingStartedList.getDomElement(), announcementList.getDomElement());
|
||||
}
|
||||
@@ -788,3 +795,3 @@ export class GettingStartedPage extends EditorPane {
|
||||
this.container.classList.add('noWalkthroughs');
|
||||
- reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
||||
+ reset(leftColumn, startList.getDomElement(), announcementList.getDomElement());
|
||||
reset(rightColumn, featuredExtensionList.getDomElement());
|
||||
@@ -982,2 +989,51 @@ export class GettingStartedPage extends EditorPane {
|
||||
- reset(rightColumn, featuredExtensionList.getDomElement());
|
||||
+ reset(rightColumn, featuredExtensionList.getDomElement(), announcementList.getDomElement());
|
||||
}
|
||||
@@ -946,2 +953,55 @@ export class GettingStartedPage extends EditorPane {
|
||||
|
||||
+ private async buildAnnouncementList(): Promise<GettingStartedIndexList<AnnouncementEntry>> {
|
||||
+ const renderAnnouncement = (announcement: AnnouncementEntry) => {
|
||||
@@ -75,15 +75,19 @@ index 46949b2..174e65f 100644
|
||||
+
|
||||
+ if (showExtras) {
|
||||
+ const branch = this.productService.quality === 'insider' ? 'insider' : 'master';
|
||||
+ const res = await fetch(`https://raw.githubusercontent.com/VSCodium/vscodium/${branch}/announcements-extra.json`);
|
||||
+ await fetch(`https://raw.githubusercontent.com/VSCodium/vscodium/${branch}/announcements-extra.json`)
|
||||
+ .then(async res => {
|
||||
+ if (res.ok) {
|
||||
+ var extraAnnouncements = await res.json() as AnnouncementEntry[];
|
||||
+
|
||||
+ if (res.ok) {
|
||||
+ var extraAnnouncements = await res.json() as AnnouncementEntry[];
|
||||
+
|
||||
+ this.announcementData = [...extraAnnouncements, ...BUILTIN_ANNOUNCEMENTS];
|
||||
+ } else {
|
||||
+ this.announcementData = BUILTIN_ANNOUNCEMENTS;
|
||||
+ }
|
||||
+ this.announcementData = [...extraAnnouncements, ...BUILTIN_ANNOUNCEMENTS];
|
||||
+ } else {
|
||||
+ this.announcementData = BUILTIN_ANNOUNCEMENTS;
|
||||
+ }
|
||||
+ })
|
||||
+ .catch(err => {
|
||||
+ this.announcementData = BUILTIN_ANNOUNCEMENTS;
|
||||
+ });
|
||||
+ } else {
|
||||
+ this.announcementData = BUILTIN_ANNOUNCEMENTS;
|
||||
+ }
|
||||
|
||||
@@ -1,14 +1,30 @@
|
||||
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
|
||||
index 0d7d3c5..90f75cc 100644
|
||||
--- a/build/gulpfile.vscode.linux.js
|
||||
+++ b/build/gulpfile.vscode.linux.js
|
||||
@@ -299,4 +299,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
|
||||
const prepareDebTask = task.define(`vscode-linux-${arch}-prepare-deb`, task.series(util.rimraf(`.build/linux/deb/${debArch}`), prepareDebPackage(arch)));
|
||||
- gulp.task(prepareDebTask);
|
||||
- const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, buildDebPackage(arch));
|
||||
+ const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, task.series(prepareDebTask, buildDebPackage(arch)));
|
||||
gulp.task(buildDebTask);
|
||||
@@ -305,4 +304,3 @@ BUILD_TARGETS.forEach(({ arch }) => {
|
||||
const prepareRpmTask = task.define(`vscode-linux-${arch}-prepare-rpm`, task.series(util.rimraf(`.build/linux/rpm/${rpmArch}`), prepareRpmPackage(arch)));
|
||||
- gulp.task(prepareRpmTask);
|
||||
- const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, buildRpmPackage(arch));
|
||||
+ const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, task.series(prepareRpmTask, buildRpmPackage(arch)));
|
||||
gulp.task(buildRpmTask);
|
||||
diff --git a/build/linux/dependencies-generator.js b/build/linux/dependencies-generator.js
|
||||
index af20828..f09ba66 100644
|
||||
index 0ea6699..c4524de 100644
|
||||
--- a/build/linux/dependencies-generator.js
|
||||
+++ b/build/linux/dependencies-generator.js
|
||||
@@ -22,3 +22,3 @@ const types_2 = require("./rpm/types");
|
||||
// are valid, are in dep-lists.ts
|
||||
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES = true;
|
||||
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES = false;
|
||||
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/98.0.4758.109:chrome/installer/linux/BUILD.gn;l=64-80
|
||||
// Based on https://source.chromium.org/chromium/chromium/src/+/refs/tags/108.0.5359.215:chrome/installer/linux/BUILD.gn;l=64-80
|
||||
diff --git a/build/linux/dependencies-generator.ts b/build/linux/dependencies-generator.ts
|
||||
index 34573c4..91adb8f 100644
|
||||
index c0d8112..3bb0366 100644
|
||||
--- a/build/linux/dependencies-generator.ts
|
||||
+++ b/build/linux/dependencies-generator.ts
|
||||
@@ -23,3 +23,3 @@ import { isRpmArchString, RpmArchString } from './rpm/types';
|
||||
@@ -17,10 +33,10 @@ index 34573c4..91adb8f 100644
|
||||
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = false;
|
||||
|
||||
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
|
||||
index 61659d2..6331a67 100644
|
||||
index 06b8549..a7e3dfb 100644
|
||||
--- a/resources/linux/rpm/code.spec.template
|
||||
+++ b/resources/linux/rpm/code.spec.template
|
||||
@@ -78 +78,3 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
@@ -81 +81,3 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
||||
%{_datadir}/zsh/site-functions/_%{name}
|
||||
+
|
||||
+%config(noreplace) /usr/share/%{name}/resources/app/product.json
|
||||
|
||||
@@ -16,7 +16,8 @@ index 7ae8bce..724b9ad 100644
|
||||
- "files.insertFinalNewline": true,
|
||||
+ // "files.insertFinalNewline": true,
|
||||
"[plaintext]": {
|
||||
@@ -91,3 +91,3 @@
|
||||
@@ -91,4 +91,4 @@
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||
- "editor.formatOnSave": true
|
||||
+ // "editor.formatOnSave": true
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
|
||||
index ae33cc9..06c2a67 100644
|
||||
index 2a0c236..0f10f17 100644
|
||||
--- a/build/gulpfile.reh.js
|
||||
+++ b/build/gulpfile.reh.js
|
||||
@@ -251,3 +251,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
@@ -256,3 +256,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
const productJsonStream = gulp.src(['product.json'], { base: '.' })
|
||||
- .pipe(json({ commit, date, version, release }));
|
||||
+ .pipe(json({ commit, date, version, release, serverDownloadUrlTemplate: 'https://github.com/VSCodium/vscodium-insiders/releases/download/${version}.${release}-insider/vscodium-reh-${os}-${arch}-${version}.${release}-insider.tar.gz' }));
|
||||
|
||||
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
||||
index 938943d..2d84a15 100644
|
||||
index 0ca2cfd..9bf83a7 100644
|
||||
--- a/build/gulpfile.vscode.js
|
||||
+++ b/build/gulpfile.vscode.js
|
||||
@@ -245,3 +245,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
@@ -244,3 +244,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
const date = new Date().toISOString();
|
||||
- const productJsonUpdate = { commit, date, checksums, version, release };
|
||||
+ const productJsonUpdate = { commit, date, checksums, version, release, serverDownloadUrlTemplate: 'https://github.com/VSCodium/vscodium-insiders/releases/download/${version}.${release}-insider/vscodium-reh-${os}-${arch}-${version}.${release}-insider.tar.gz' };
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
diff --git a/src/vs/platform/windows/electron-main/windowImpl.ts b/src/vs/platform/windows/electron-main/windowImpl.ts
|
||||
index 3b8a644..71ea0ad 100644
|
||||
--- a/src/vs/platform/windows/electron-main/windowImpl.ts
|
||||
+++ b/src/vs/platform/windows/electron-main/windowImpl.ts
|
||||
@@ -213,4 +213,2 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
useSandbox = true;
|
||||
- } else {
|
||||
- useSandbox = typeof this.productService.quality === 'string' && this.productService.quality !== 'stable';
|
||||
}
|
||||
@@ -1,21 +1,37 @@
|
||||
diff --git a/src/main.js b/src/main.js
|
||||
index d986fee..1ad0ef0 100644
|
||||
--- a/src/main.js
|
||||
+++ b/src/main.js
|
||||
@@ -18,2 +18,3 @@ perf.mark('code/didStartMain');
|
||||
const path = require('path');
|
||||
+const { fileURLToPath } = require('url');
|
||||
const fs = require('fs');
|
||||
@@ -149,2 +150,14 @@ app.once('ready', function () {
|
||||
|
||||
+function resolveUserProduct() {
|
||||
+ const userDataPath = getUserDataPath({}, product.nameShort ?? 'code-oss-dev');
|
||||
+ const userProductPath = `file:///${userDataPath}/product.json`;
|
||||
+
|
||||
+ try {
|
||||
+ // Assign the product configuration to the global scope
|
||||
+ const productPath = require(fileURLToPath(userProductPath));
|
||||
+ global["_VSCODE_USER_PRODUCT_JSON"] = productPath;
|
||||
+ } catch (ex) {
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/**
|
||||
@@ -160,2 +173,3 @@ function startup(codeCachePath, nlsConfig) {
|
||||
process.env['VSCODE_CODE_CACHE_PATH'] = codeCachePath || '';
|
||||
+ resolveUserProduct();
|
||||
|
||||
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
||||
index ef798fa..5a0550b 100644
|
||||
index 51a55e1..e2af375 100644
|
||||
--- a/src/vs/platform/product/common/product.ts
|
||||
+++ b/src/vs/platform/product/common/product.ts
|
||||
@@ -5,3 +5,4 @@
|
||||
@@ -29,2 +29,36 @@ else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
|
||||
|
||||
-import { globals } from 'vs/base/common/platform';
|
||||
+import { AppResourcePath, FileAccess } from 'vs/base/common/network';
|
||||
+import { globals, isWindows } from 'vs/base/common/platform';
|
||||
import { env } from 'vs/base/common/process';
|
||||
@@ -9,2 +10,3 @@ import { IProductConfiguration } from 'vs/base/common/product';
|
||||
import { ISandboxConfiguration } from 'vs/base/parts/sandbox/common/sandboxTypes';
|
||||
+import { getUserDataPath } from 'vs/platform/environment/node/userDataPath';
|
||||
|
||||
@@ -29,2 +31,40 @@ else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
|
||||
|
||||
+ // Set user-defined extension gallery
|
||||
+ const { serviceUrl, searchUrl, itemUrl, controlUrl } = product.extensionsGallery || {}
|
||||
+ const { serviceUrl, searchUrl, itemUrl, controlUrl } = product.extensionsGallery || {};
|
||||
+
|
||||
+ Object.assign(product, {
|
||||
+ extensionsGallery: {
|
||||
@@ -24,7 +40,7 @@ index ef798fa..5a0550b 100644
|
||||
+ itemUrl: env['VSCODE_GALLERY_ITEM_URL'] || itemUrl,
|
||||
+ controlUrl: env['VSCODE_GALLERY_CONTROL_URL'] || controlUrl,
|
||||
+ }
|
||||
+ })
|
||||
+ });
|
||||
+
|
||||
+ // Merge user-customized product.json
|
||||
+ try {
|
||||
@@ -43,10 +59,7 @@ index ef798fa..5a0550b 100644
|
||||
+ return result;
|
||||
+ }, {}) as any;
|
||||
+
|
||||
+ const userDataPath = getUserDataPath({} as any, product.nameShort);
|
||||
+ const userProductPath = isWindows ? `file:///${userDataPath}/product.json` : `file://${userDataPath}/product.json`;
|
||||
+
|
||||
+ const userProduct = require.__$__nodeRequire(FileAccess.asFileUri(userProductPath as AppResourcePath).fsPath);
|
||||
+ const userProduct = (globalThis as Record<string, any>)._VSCODE_USER_PRODUCT_JSON || {};
|
||||
+
|
||||
+ product = merge(product, userProduct);
|
||||
+ } catch (ex) {
|
||||
264
patches/ppc64le-support.patch
Normal file
@@ -0,0 +1,264 @@
|
||||
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
|
||||
index 2a0c236eaf0..be2528c5c48 100644
|
||||
--- a/build/gulpfile.reh.js
|
||||
+++ b/build/gulpfile.reh.js
|
||||
@@ -46,6 +46,7 @@ const BUILD_TARGETS = [
|
||||
{ platform: 'linux', arch: 'x64' },
|
||||
{ platform: 'linux', arch: 'armhf' },
|
||||
{ platform: 'linux', arch: 'arm64' },
|
||||
+ { platform: 'linux', arch: 'ppc64le' },
|
||||
{ platform: 'alpine', arch: 'arm64' },
|
||||
// legacy: we use to ship only one alpine so it was put in the arch, but now we ship
|
||||
// multiple alpine images and moved to a better model (alpine as the platform)
|
||||
diff --git a/build/gulpfile.scan.js b/build/gulpfile.scan.js
|
||||
index 62691fcc8cf..dbefb8549f1 100644
|
||||
--- a/build/gulpfile.scan.js
|
||||
+++ b/build/gulpfile.scan.js
|
||||
@@ -24,6 +24,7 @@ const BUILD_TARGETS = [
|
||||
{ platform: 'linux', arch: 'x64' },
|
||||
{ platform: 'linux', arch: 'armhf' },
|
||||
{ platform: 'linux', arch: 'arm64' },
|
||||
+ { platform: 'linux', arch: 'ppc64le' },
|
||||
];
|
||||
|
||||
BUILD_TARGETS.forEach(buildTarget => {
|
||||
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
||||
index 0ca2cfd60a9..18a60efc405 100644
|
||||
--- a/build/gulpfile.vscode.js
|
||||
+++ b/build/gulpfile.vscode.js
|
||||
@@ -426,6 +426,7 @@ const BUILD_TARGETS = [
|
||||
{ platform: 'linux', arch: 'x64' },
|
||||
{ platform: 'linux', arch: 'armhf' },
|
||||
{ platform: 'linux', arch: 'arm64' },
|
||||
+ { platform: 'linux', arch: 'ppc64le' },
|
||||
];
|
||||
BUILD_TARGETS.forEach(buildTarget => {
|
||||
const dashed = (str) => (str ? `-${str}` : ``);
|
||||
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
|
||||
index 90f75ccfabd..a9fe7715da9 100644
|
||||
--- a/build/gulpfile.vscode.linux.js
|
||||
+++ b/build/gulpfile.vscode.linux.js
|
||||
@@ -29,7 +29,7 @@ const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
|
||||
* @param {string} arch
|
||||
*/
|
||||
function getDebPackageArch(arch) {
|
||||
- return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64' }[arch];
|
||||
+ return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64', ppc64le: 'ppc64le' }[arch];
|
||||
}
|
||||
|
||||
function prepareDebPackage(arch) {
|
||||
@@ -136,7 +136,7 @@ function getRpmBuildPath(rpmArch) {
|
||||
* @param {string} arch
|
||||
*/
|
||||
function getRpmPackageArch(arch) {
|
||||
- return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64' }[arch];
|
||||
+ return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64', ppc64le: 'ppc64le' }[arch];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,6 +292,7 @@ const BUILD_TARGETS = [
|
||||
{ arch: 'x64' },
|
||||
{ arch: 'armhf' },
|
||||
{ arch: 'arm64' },
|
||||
+ { arch: 'ppc64le' },
|
||||
];
|
||||
|
||||
BUILD_TARGETS.forEach(({ arch }) => {
|
||||
diff --git a/build/linux/debian/calculate-deps.ts b/build/linux/debian/calculate-deps.ts
|
||||
index b13d3cdfaaf..650e4de3894 100644
|
||||
--- a/build/linux/debian/calculate-deps.ts
|
||||
+++ b/build/linux/debian/calculate-deps.ts
|
||||
@@ -52,6 +52,9 @@ function calculatePackageDeps(binaryPath: string, arch: DebianArchString, sysroo
|
||||
case 'arm64':
|
||||
cmd.push(`-l${sysroot}/usr/lib/aarch64-linux-gnu`,
|
||||
`-l${sysroot}/lib/aarch64-linux-gnu`);
|
||||
+ case 'ppc64le':
|
||||
+ cmd.push(`-l${sysroot}/usr/lib/ppc64le-linux-gnu`,
|
||||
+ `-l${sysroot}/lib/ppc64le-linux-gnu`);
|
||||
break;
|
||||
}
|
||||
cmd.push(`-l${sysroot}/usr/lib`);
|
||||
diff --git a/build/linux/debian/dep-lists.ts b/build/linux/debian/dep-lists.ts
|
||||
index 52aa56d960b..857589ec9ff 100644
|
||||
--- a/build/linux/debian/dep-lists.ts
|
||||
+++ b/build/linux/debian/dep-lists.ts
|
||||
@@ -136,5 +136,44 @@ export const referenceGeneratedDepsByArch = {
|
||||
'libxkbfile1',
|
||||
'libxrandr2',
|
||||
'xdg-utils (>= 1.0.2)'
|
||||
+ ],
|
||||
+ 'ppc64le': [
|
||||
+ 'ca-certificates',
|
||||
+ 'libasound2 (>= 1.0.17)',
|
||||
+ 'libatk-bridge2.0-0 (>= 2.5.3)',
|
||||
+ 'libatk1.0-0 (>= 2.2.0)',
|
||||
+ 'libatspi2.0-0 (>= 2.9.90)',
|
||||
+ 'libc6 (>= 2.17)',
|
||||
+ 'libc6 (>= 2.28)',
|
||||
+ 'libcairo2 (>= 1.6.0)',
|
||||
+ 'libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3',
|
||||
+ 'libdbus-1-3 (>= 1.0.2)',
|
||||
+ 'libdrm2 (>= 2.4.60)',
|
||||
+ 'libexpat1 (>= 2.0.1)',
|
||||
+ 'libgbm1 (>= 17.1.0~rc2)',
|
||||
+ 'libglib2.0-0 (>= 2.16.0)',
|
||||
+ 'libglib2.0-0 (>= 2.39.4)',
|
||||
+ 'libgtk-3-0 (>= 3.9.10)',
|
||||
+ 'libgtk-3-0 (>= 3.9.10) | libgtk-4-1',
|
||||
+ 'libnspr4 (>= 2:4.9-2~)',
|
||||
+ 'libnss3 (>= 2:3.22)',
|
||||
+ 'libnss3 (>= 3.26)',
|
||||
+ 'libpango-1.0-0 (>= 1.14.0)',
|
||||
+ 'libsecret-1-0 (>= 0.18)',
|
||||
+ 'libstdc++6 (>= 4.1.1)',
|
||||
+ 'libstdc++6 (>= 5)',
|
||||
+ 'libstdc++6 (>= 5.2)',
|
||||
+ 'libstdc++6 (>= 6)',
|
||||
+ 'libx11-6',
|
||||
+ 'libx11-6 (>= 2:1.4.99.1)',
|
||||
+ 'libxcb1 (>= 1.9.2)',
|
||||
+ 'libxcomposite1 (>= 1:0.4.4-1)',
|
||||
+ 'libxdamage1 (>= 1:1.1)',
|
||||
+ 'libxext6',
|
||||
+ 'libxfixes3',
|
||||
+ 'libxkbcommon0 (>= 0.4.1)',
|
||||
+ 'libxkbfile1',
|
||||
+ 'libxrandr2',
|
||||
+ 'xdg-utils (>= 1.0.2)'
|
||||
]
|
||||
};
|
||||
diff --git a/build/linux/debian/types.ts b/build/linux/debian/types.ts
|
||||
index e97485ef128..356027a648b 100644
|
||||
--- a/build/linux/debian/types.ts
|
||||
+++ b/build/linux/debian/types.ts
|
||||
@@ -3,8 +3,8 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
-export type DebianArchString = 'amd64' | 'armhf' | 'arm64';
|
||||
+export type DebianArchString = 'amd64' | 'armhf' | 'arm64' | 'ppc64le';
|
||||
|
||||
export function isDebianArchString(s: string): s is DebianArchString {
|
||||
- return ['amd64', 'armhf', 'arm64'].includes(s);
|
||||
+ return ['amd64', 'armhf', 'arm64', 'ppc64le'].includes(s);
|
||||
}
|
||||
diff --git a/cli/src/update_service.rs b/cli/src/update_service.rs
|
||||
index b03d8ea5963..2beceeac640 100644
|
||||
--- a/cli/src/update_service.rs
|
||||
+++ b/cli/src/update_service.rs
|
||||
@@ -209,6 +209,7 @@ pub enum Platform {
|
||||
LinuxX64,
|
||||
LinuxARM64,
|
||||
LinuxARM32,
|
||||
+ LinuxPPC64LE,
|
||||
DarwinX64,
|
||||
DarwinARM64,
|
||||
WindowsX64,
|
||||
@@ -222,6 +223,7 @@ impl Platform {
|
||||
Platform::LinuxX64 => Some("linux-x64".to_owned()),
|
||||
Platform::LinuxARM64 => Some("linux-arm64".to_owned()),
|
||||
Platform::LinuxARM32 => Some("linux-armhf".to_owned()),
|
||||
+ Platform::LinuxPPC64LE => Some("linux-ppc64le".to_owned()),
|
||||
Platform::DarwinX64 => Some("darwin".to_owned()),
|
||||
Platform::DarwinARM64 => Some("darwin-arm64".to_owned()),
|
||||
Platform::WindowsX64 => Some("win32-x64-archive".to_owned()),
|
||||
@@ -237,6 +239,7 @@ impl Platform {
|
||||
Platform::LinuxX64 => "server-linux-x64",
|
||||
Platform::LinuxARM64 => "server-linux-arm64",
|
||||
Platform::LinuxARM32 => "server-linux-armhf",
|
||||
+ Platform::LinuxPPC64LE => "server-linux-ppc64le",
|
||||
Platform::DarwinX64 => "server-darwin",
|
||||
Platform::DarwinARM64 => "server-darwin-arm64",
|
||||
Platform::WindowsX64 => "server-win32-x64",
|
||||
@@ -253,6 +256,7 @@ impl Platform {
|
||||
Platform::LinuxX64 => "cli-linux-x64",
|
||||
Platform::LinuxARM64 => "cli-linux-arm64",
|
||||
Platform::LinuxARM32 => "cli-linux-armhf",
|
||||
+ Platform::LinuxPPC64LE => "cli-linux-ppc64le",
|
||||
Platform::DarwinX64 => "cli-darwin-x64",
|
||||
Platform::DarwinARM64 => "cli-darwin-arm64",
|
||||
Platform::WindowsARM64 => "cli-win32-arm64",
|
||||
@@ -285,6 +289,8 @@ impl Platform {
|
||||
Some(Platform::LinuxARM32)
|
||||
} else if cfg!(all(target_os = "linux", target_arch = "aarch64")) {
|
||||
Some(Platform::LinuxARM64)
|
||||
+ } else if cfg!(all(target_os = "linux", target_arch = "ppc64le")) {
|
||||
+ Some(Platform::LinuxPPC64LE)
|
||||
} else if cfg!(all(target_os = "macos", target_arch = "x86_64")) {
|
||||
Some(Platform::DarwinX64)
|
||||
} else if cfg!(all(target_os = "macos", target_arch = "aarch64")) {
|
||||
@@ -309,6 +315,7 @@ impl fmt::Display for Platform {
|
||||
Platform::LinuxX64 => "LinuxX64",
|
||||
Platform::LinuxARM64 => "LinuxARM64",
|
||||
Platform::LinuxARM32 => "LinuxARM32",
|
||||
+ Platform::LinuxPPC64LE => "LinuxPPC64LE",
|
||||
Platform::DarwinX64 => "DarwinX64",
|
||||
Platform::DarwinARM64 => "DarwinARM64",
|
||||
Platform::WindowsX64 => "WindowsX64",
|
||||
diff --git a/cli/src/util/prereqs.rs b/cli/src/util/prereqs.rs
|
||||
index d8cbd1b91dd..191d312e994 100644
|
||||
--- a/cli/src/util/prereqs.rs
|
||||
+++ b/cli/src/util/prereqs.rs
|
||||
@@ -64,6 +64,8 @@ impl PreReqChecker {
|
||||
Platform::LinuxX64
|
||||
} else if cfg!(target_arch = "arm") {
|
||||
Platform::LinuxARM32
|
||||
+ } else if cfg!(target_arch = "ppc64le") {
|
||||
+ Platform::LinuxPPC64LE
|
||||
} else {
|
||||
Platform::LinuxARM64
|
||||
});
|
||||
diff --git a/src/main.js b/src/main.js
|
||||
index d986fee6f6d..02cd26a4d93 100644
|
||||
--- a/src/main.js
|
||||
+++ b/src/main.js
|
||||
@@ -405,6 +405,7 @@ function configureCrashReporter() {
|
||||
}
|
||||
}
|
||||
} else if (isLinux) {
|
||||
+
|
||||
submitURL = appCenter['linux-x64'];
|
||||
}
|
||||
submitURL = submitURL.concat('&uid=', crashReporterId, '&iid=', crashReporterId, '&sid=', crashReporterId);
|
||||
diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts
|
||||
index d407374f6ee..636da84fd62 100644
|
||||
--- a/src/vs/platform/extensionManagement/common/extensionManagement.ts
|
||||
+++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts
|
||||
@@ -28,6 +28,7 @@ export function TargetPlatformToString(targetPlatform: TargetPlatform) {
|
||||
case TargetPlatform.LINUX_X64: return 'Linux 64 bit';
|
||||
case TargetPlatform.LINUX_ARM64: return 'Linux ARM 64';
|
||||
case TargetPlatform.LINUX_ARMHF: return 'Linux ARM';
|
||||
+ case TargetPlatform.LINUX_PPC64LE: return 'Linux PPC64LE';
|
||||
|
||||
case TargetPlatform.ALPINE_X64: return 'Alpine Linux 64 bit';
|
||||
case TargetPlatform.ALPINE_ARM64: return 'Alpine ARM 64';
|
||||
@@ -52,6 +53,7 @@ export function toTargetPlatform(targetPlatform: string): TargetPlatform {
|
||||
case TargetPlatform.LINUX_X64: return TargetPlatform.LINUX_X64;
|
||||
case TargetPlatform.LINUX_ARM64: return TargetPlatform.LINUX_ARM64;
|
||||
case TargetPlatform.LINUX_ARMHF: return TargetPlatform.LINUX_ARMHF;
|
||||
+ case TargetPlatform.LINUX_PPC64LE: return TargetPlatform.LINUX_PPC64LE;
|
||||
|
||||
case TargetPlatform.ALPINE_X64: return TargetPlatform.ALPINE_X64;
|
||||
case TargetPlatform.ALPINE_ARM64: return TargetPlatform.ALPINE_ARM64;
|
||||
@@ -90,6 +92,9 @@ export function getTargetPlatform(platform: Platform | 'alpine', arch: string |
|
||||
if (arch === 'arm') {
|
||||
return TargetPlatform.LINUX_ARMHF;
|
||||
}
|
||||
+ if (arch === 'ppc64le') {
|
||||
+ return TargetPlatform.LINUX_PPC64LE;
|
||||
+ }
|
||||
return TargetPlatform.UNKNOWN;
|
||||
|
||||
case 'alpine':
|
||||
diff --git a/src/vs/platform/extensions/common/extensions.ts b/src/vs/platform/extensions/common/extensions.ts
|
||||
index cfa0e3296f0..d38a82114e3 100644
|
||||
--- a/src/vs/platform/extensions/common/extensions.ts
|
||||
+++ b/src/vs/platform/extensions/common/extensions.ts
|
||||
@@ -296,6 +296,7 @@ export const enum TargetPlatform {
|
||||
LINUX_X64 = 'linux-x64',
|
||||
LINUX_ARM64 = 'linux-arm64',
|
||||
LINUX_ARMHF = 'linux-armhf',
|
||||
+ LINUX_PPC64LE = 'linux-ppc64le',
|
||||
|
||||
ALPINE_X64 = 'alpine-x64',
|
||||
ALPINE_ARM64 = 'alpine-arm64',
|
||||
@@ -1,30 +1,26 @@
|
||||
diff --git a/build/lib/compilation.js b/build/lib/compilation.js
|
||||
index 63ddeb2..31d2f35 100644
|
||||
index 2270e05..1bd7b90 100644
|
||||
--- a/build/lib/compilation.js
|
||||
+++ b/build/lib/compilation.js
|
||||
@@ -21,3 +21,2 @@ const File = require("vinyl");
|
||||
const task = require("./task");
|
||||
-const mangleTypeScript_1 = require("./mangleTypeScript");
|
||||
const watch = require('./watch');
|
||||
@@ -104,24 +103,3 @@ function compileTask(src, out, build, options = {}) {
|
||||
@@ -104,24 +104,3 @@ function compileTask(src, out, build, options = {}) {
|
||||
}
|
||||
- // mangle: TypeScript to TypeScript
|
||||
- let mangleStream = es.through();
|
||||
- if (build && !options.disableMangle) {
|
||||
- let ts2tsMangler = new mangleTypeScript_1.Mangler(compile.projectPath, (...data) => fancyLog(ansiColors.blue('[mangler]'), ...data));
|
||||
- let ts2tsMangler = new index_1.Mangler(compile.projectPath, (...data) => fancyLog(ansiColors.blue('[mangler]'), ...data), { mangleExports: true, manglePrivateFields: true });
|
||||
- const newContentsByFileName = ts2tsMangler.computeNewFileContents(new Set(['saveState']));
|
||||
- mangleStream = es.through(function write(data) {
|
||||
- mangleStream = es.through(async function write(data) {
|
||||
- const tsNormalPath = ts.normalizePath(data.path);
|
||||
- const newContents = newContentsByFileName.get(tsNormalPath);
|
||||
- const newContents = (await newContentsByFileName).get(tsNormalPath);
|
||||
- if (newContents !== undefined) {
|
||||
- data.contents = Buffer.from(newContents.out);
|
||||
- data.sourceMap = newContents.sourceMap && JSON.parse(newContents.sourceMap);
|
||||
- }
|
||||
- this.push(data);
|
||||
- }, function end() {
|
||||
- this.push(null);
|
||||
- }, async function end() {
|
||||
- // free resources
|
||||
- newContentsByFileName.clear();
|
||||
- (await newContentsByFileName).clear();
|
||||
- this.push(null);
|
||||
- ts2tsMangler = undefined;
|
||||
- });
|
||||
- }
|
||||
@@ -32,34 +28,30 @@ index 63ddeb2..31d2f35 100644
|
||||
- .pipe(mangleStream)
|
||||
.pipe(generator.stream)
|
||||
diff --git a/build/lib/compilation.ts b/build/lib/compilation.ts
|
||||
index d5cd196..afe16d3 100644
|
||||
index d5da3f1..fa46962 100644
|
||||
--- a/build/lib/compilation.ts
|
||||
+++ b/build/lib/compilation.ts
|
||||
@@ -19,4 +19,2 @@ import * as File from 'vinyl';
|
||||
import * as task from './task';
|
||||
-import { Mangler } from './mangleTypeScript';
|
||||
-import { RawSourceMap } from 'source-map';
|
||||
const watch = require('./watch');
|
||||
@@ -123,26 +121,3 @@ export function compileTask(src: string, out: string, build: boolean, options: {
|
||||
@@ -123,27 +123,3 @@ export function compileTask(src: string, out: string, build: boolean, options: {
|
||||
|
||||
- // mangle: TypeScript to TypeScript
|
||||
- let mangleStream = es.through();
|
||||
- if (build && !options.disableMangle) {
|
||||
- let ts2tsMangler = new Mangler(compile.projectPath, (...data) => fancyLog(ansiColors.blue('[mangler]'), ...data));
|
||||
- let ts2tsMangler = new Mangler(compile.projectPath, (...data) => fancyLog(ansiColors.blue('[mangler]'), ...data), { mangleExports: true, manglePrivateFields: true });
|
||||
- const newContentsByFileName = ts2tsMangler.computeNewFileContents(new Set(['saveState']));
|
||||
- mangleStream = es.through(function write(data: File & { sourceMap?: RawSourceMap }) {
|
||||
- mangleStream = es.through(async function write(data: File & { sourceMap?: RawSourceMap }) {
|
||||
- type TypeScriptExt = typeof ts & { normalizePath(path: string): string };
|
||||
- const tsNormalPath = (<TypeScriptExt>ts).normalizePath(data.path);
|
||||
- const newContents = newContentsByFileName.get(tsNormalPath);
|
||||
- const newContents = (await newContentsByFileName).get(tsNormalPath);
|
||||
- if (newContents !== undefined) {
|
||||
- data.contents = Buffer.from(newContents.out);
|
||||
- data.sourceMap = newContents.sourceMap && JSON.parse(newContents.sourceMap);
|
||||
- }
|
||||
- this.push(data);
|
||||
- }, function end() {
|
||||
- this.push(null);
|
||||
- }, async function end() {
|
||||
- // free resources
|
||||
- newContentsByFileName.clear();
|
||||
- (await newContentsByFileName).clear();
|
||||
-
|
||||
- this.push(null);
|
||||
- (<any>ts2tsMangler) = undefined;
|
||||
- });
|
||||
- }
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
diff --git a/src/vs/code/electron-sandbox/issue/issueReporterMain.ts b/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
|
||||
index 33e66be..a7ade0a 100644
|
||||
--- a/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
|
||||
+++ b/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
|
||||
@@ -468,3 +468,3 @@ export class IssueReporter extends Disposable {
|
||||
diff --git a/src/vs/code/electron-sandbox/issue/issueReporterService.ts b/src/vs/code/electron-sandbox/issue/issueReporterService.ts
|
||||
index d0c4789..9e6bfc5 100644
|
||||
--- a/src/vs/code/electron-sandbox/issue/issueReporterService.ts
|
||||
+++ b/src/vs/code/electron-sandbox/issue/issueReporterService.ts
|
||||
@@ -455,5 +455,5 @@ export class IssueReporter extends Disposable {
|
||||
|
||||
- private searchVSCodeIssues(title: string, issueDescription?: string): void {
|
||||
+ private searchVSCodeIssues(title: string, _issueDescription?: string): void {
|
||||
if (title) {
|
||||
- this.searchDuplicates(title, issueDescription);
|
||||
+ this.searchGitHub('VSCodium/vscodium', title);
|
||||
} else {
|
||||
@@ -556,33 +556,2 @@ export class IssueReporter extends Disposable {
|
||||
@@ -549,33 +549,2 @@ export class IssueReporter extends Disposable {
|
||||
|
||||
- @debounce(300)
|
||||
- private searchDuplicates(title: string, body?: string): void {
|
||||
@@ -41,13 +44,13 @@ index 33e66be..a7ade0a 100644
|
||||
- }
|
||||
-
|
||||
private displaySearchResults(results: SearchResult[]) {
|
||||
@@ -674,3 +643,3 @@ export class IssueReporter extends Disposable {
|
||||
@@ -667,3 +636,3 @@ export class IssueReporter extends Disposable {
|
||||
sourceSelect.append(this.makeOption('', localize('selectSource', "Select source"), true));
|
||||
- sourceSelect.append(this.makeOption('vscode', localize('vscode', "Visual Studio Code"), false));
|
||||
+ sourceSelect.append(this.makeOption('vscode', localize('vscode', "VSCodium"), false));
|
||||
sourceSelect.append(this.makeOption('extension', localize('extension', "An extension"), false));
|
||||
diff --git a/src/vs/code/electron-sandbox/issue/issueReporterModel.ts b/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
|
||||
index a58acca..1903a0c 100644
|
||||
index 98338df..6d2f581 100644
|
||||
--- a/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
|
||||
+++ b/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
|
||||
@@ -77,3 +77,3 @@ ${this._data.issueDescription}
|
||||
@@ -56,7 +59,7 @@ index a58acca..1903a0c 100644
|
||||
+VSCodium version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
|
||||
OS version: ${this._data.versionInfo && this._data.versionInfo.os}
|
||||
diff --git a/src/vs/code/electron-sandbox/issue/issueReporterPage.ts b/src/vs/code/electron-sandbox/issue/issueReporterPage.ts
|
||||
index 6467d66..d425016 100644
|
||||
index 0eedb21..c83e092 100644
|
||||
--- a/src/vs/code/electron-sandbox/issue/issueReporterPage.ts
|
||||
+++ b/src/vs/code/electron-sandbox/issue/issueReporterPage.ts
|
||||
@@ -17,3 +17,3 @@ const reviewGuidanceLabel = localize( // intentionally not escaped because of it
|
||||
@@ -70,10 +73,10 @@ index 6467d66..d425016 100644
|
||||
+ 'Before you report an issue here please <a href="https://github.com/VSCodium/vscodium/wiki/Submitting-Bugs-and-Suggestions" target="_blank">review the guidance we provide</a>.'
|
||||
);
|
||||
diff --git a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions.ts b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions.ts
|
||||
index 20154ad..bca59b8 100644
|
||||
index 87839a6..49727fc 100644
|
||||
--- a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions.ts
|
||||
+++ b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions.ts
|
||||
@@ -148,3 +148,3 @@ class ReportExtensionSlowAction extends Action {
|
||||
@@ -153,3 +153,3 @@ class ReportExtensionSlowAction extends Action {
|
||||
- OS Version: \`${osVersion}\`
|
||||
-- VS Code version: \`${this._productService.version}\`\n\n${message}`);
|
||||
+- VSCodium version: \`${this._productService.version}\`\n\n${message}`);
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts
|
||||
index 93424ca..133657e 100644
|
||||
index d45291e..74d4080 100644
|
||||
--- a/src/vs/platform/update/electron-main/updateService.win32.ts
|
||||
+++ b/src/vs/platform/update/electron-main/updateService.win32.ts
|
||||
@@ -53,7 +53,7 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
|
||||
@memoize
|
||||
@@ -55,3 +55,3 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
get cachePath(): Promise<string> {
|
||||
- const result = path.join(tmpdir(), `vscode-update-${this.productService.target}-${process.arch}`);
|
||||
+ const result = path.join(tmpdir(), `${this.productService.applicationName}-update-${this.productService.target}-${process.arch}`);
|
||||
- const result = path.join(tmpdir(), `vscode-${this.productService.quality}-${this.productService.target}-${process.arch}`);
|
||||
+ const result = path.join(tmpdir(), `${this.productService.applicationName}-${this.productService.quality}-${this.productService.target}-${process.arch}`);
|
||||
return pfs.Promises.mkdir(result, { recursive: true }).then(() => result);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ index 7cd4a84..7cbdf21 100644
|
||||
+ WindowsInstaller,
|
||||
}
|
||||
diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts
|
||||
index caecd71..4c02afa 100644
|
||||
index d45291e..4d8c5df 100644
|
||||
--- a/src/vs/platform/update/electron-main/updateService.win32.ts
|
||||
+++ b/src/vs/platform/update/electron-main/updateService.win32.ts
|
||||
@@ -41,5 +41,9 @@ function getUpdateType(): UpdateType {
|
||||
@@ -45,7 +45,7 @@ index caecd71..4c02afa 100644
|
||||
}
|
||||
@@ -243,6 +254,14 @@ export class Win32UpdateService extends AbstractUpdateService {
|
||||
} else {
|
||||
- spawn(this.availableUpdate.packagePath, ['/silent', '/mergetasks=runcode,!desktopicon,!quicklaunchicon'], {
|
||||
- spawn(this.availableUpdate.packagePath, ['/silent', '/log', '/mergetasks=runcode,!desktopicon,!quicklaunchicon'], {
|
||||
- detached: true,
|
||||
- stdio: ['ignore', 'ignore', 'ignore']
|
||||
- });
|
||||
@@ -56,7 +56,7 @@ index caecd71..4c02afa 100644
|
||||
+ stdio: ['ignore', 'ignore', 'ignore']
|
||||
+ });
|
||||
+ } else {
|
||||
+ spawn(this.availableUpdate.packagePath, ['/silent', '/mergetasks=runcode,!desktopicon,!quicklaunchicon'], {
|
||||
+ spawn(this.availableUpdate.packagePath, ['/silent', '/log', '/mergetasks=runcode,!desktopicon,!quicklaunchicon'], {
|
||||
+ detached: true,
|
||||
+ stdio: ['ignore', 'ignore', 'ignore']
|
||||
+ });
|
||||
|
||||
@@ -1,432 +1,52 @@
|
||||
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
|
||||
index dc7278f..a1adcf7 100644
|
||||
--- a/extensions/github-authentication/src/githubServer.ts
|
||||
+++ b/extensions/github-authentication/src/githubServer.ts
|
||||
@@ -6,4 +6,2 @@
|
||||
import * as vscode from 'vscode';
|
||||
-import * as path from 'path';
|
||||
-import { PromiseAdapter, promiseFromEvent } from './common/utils';
|
||||
import { ExperimentationTelemetry } from './common/experimentationService';
|
||||
@@ -11,14 +9,7 @@ import { AuthProviderType, UriEventHandler } from './github';
|
||||
import { Log } from './common/logger';
|
||||
-import { isSupportedClient, isSupportedTarget } from './common/env';
|
||||
-import { LoopbackAuthServer } from './node/authServer';
|
||||
-import { crypto } from './node/crypto';
|
||||
+import { isSupportedTarget } from './common/env';
|
||||
import { fetching } from './node/fetch';
|
||||
diff --git a/extensions/github-authentication/src/common/env.ts b/extensions/github-authentication/src/common/env.ts
|
||||
index ebc4749..18fd732 100644
|
||||
--- a/extensions/github-authentication/src/common/env.ts
|
||||
+++ b/extensions/github-authentication/src/common/env.ts
|
||||
@@ -7,21 +7,4 @@ import { AuthProviderType } from '../github';
|
||||
|
||||
-const CLIENT_ID = '01ab8ac9400c4e429b23';
|
||||
-const GITHUB_TOKEN_URL = 'https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token';
|
||||
const NETWORK_ERROR = 'network error';
|
||||
|
||||
-const REDIRECT_URL_STABLE = 'https://vscode.dev/redirect';
|
||||
-const REDIRECT_URL_INSIDERS = 'https://insiders.vscode.dev/redirect';
|
||||
-
|
||||
export interface IGitHubServer {
|
||||
@@ -30,9 +21,2 @@ export interface IGitHubServer {
|
||||
|
||||
-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[]> {
|
||||
@@ -63,8 +47,4 @@ export class GitHubServer implements IGitHubServer {
|
||||
|
||||
- private readonly _pendingNonces = new Map<string, string[]>();
|
||||
- private readonly _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
|
||||
private readonly _type: AuthProviderType;
|
||||
|
||||
- private _redirectEndpoint: string | undefined;
|
||||
-
|
||||
constructor(
|
||||
@@ -72,3 +52,5 @@ export class GitHubServer implements IGitHubServer {
|
||||
private readonly _telemetryReporter: ExperimentationTelemetry,
|
||||
+ // @ts-ignore
|
||||
private readonly _uriHandler: UriEventHandler,
|
||||
+ // @ts-ignore
|
||||
private readonly _extensionKind: vscode.ExtensionKind,
|
||||
@@ -87,26 +69,2 @@ export class GitHubServer implements IGitHubServer {
|
||||
|
||||
- private async getRedirectEndpoint(): Promise<string> {
|
||||
- if (this._redirectEndpoint) {
|
||||
- return this._redirectEndpoint;
|
||||
- }
|
||||
- if (this._type === AuthProviderType.github) {
|
||||
- const proxyEndpoints = await vscode.commands.executeCommand<{ [providerId: string]: string } | undefined>('workbench.getCodeExchangeProxyEndpoints');
|
||||
- // If we are running in insiders vscode.dev, then ensure we use the redirect route on that.
|
||||
- this._redirectEndpoint = REDIRECT_URL_STABLE;
|
||||
- if (proxyEndpoints?.github && new URL(proxyEndpoints.github).hostname === 'insiders.vscode.dev') {
|
||||
- this._redirectEndpoint = REDIRECT_URL_INSIDERS;
|
||||
- }
|
||||
- } else {
|
||||
- // GHE only supports a single redirect endpoint, so we can't use
|
||||
- // insiders.vscode.dev/redirect when we're running in Insiders, unfortunately.
|
||||
- // Additionally, we make the assumption that this function will only be used
|
||||
- // in flows that target supported GHE targets, not on-prem GHES. Because of this
|
||||
- // assumption, we can assume that the GHE version used is at least 3.8 which is
|
||||
- // the version that changed the redirect endpoint to this URI from the old
|
||||
- // GitHub maintained server.
|
||||
- this._redirectEndpoint = 'https://vscode.dev/redirect';
|
||||
- }
|
||||
- return this._redirectEndpoint;
|
||||
- }
|
||||
-
|
||||
// TODO@joaomoreno TODO@TylerLeonhardt
|
||||
@@ -122,71 +80,8 @@ export class GitHubServer implements IGitHubServer {
|
||||
let userCancelled: boolean | undefined;
|
||||
- const yes = vscode.l10n.t('Yes');
|
||||
- const no = vscode.l10n.t('No');
|
||||
- const promptToContinue = async () => {
|
||||
- if (userCancelled === undefined) {
|
||||
- // We haven't had a failure yet so wait to prompt
|
||||
- return;
|
||||
- }
|
||||
- const message = userCancelled
|
||||
- ? vscode.l10n.t('Having trouble logging in? Would you like to try a different way?')
|
||||
- : vscode.l10n.t('You have not yet finished authorizing this extension to use GitHub. Would you like to keep trying?');
|
||||
- const result = await vscode.window.showWarningMessage(message, yes, no);
|
||||
- if (result !== yes) {
|
||||
- throw new Error('Cancelled');
|
||||
- }
|
||||
- };
|
||||
-
|
||||
- const nonce: string = crypto.getRandomValues(new Uint32Array(2)).reduce((prev, curr) => prev += curr.toString(16), '');
|
||||
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate?nonce=${encodeURIComponent(nonce)}`));
|
||||
|
||||
- const supportedClient = isSupportedClient(callbackUri);
|
||||
- const supportedTarget = isSupportedTarget(this._type, this._ghesUri);
|
||||
- if (supportedClient && supportedTarget) {
|
||||
- try {
|
||||
- return await this.doLoginWithoutLocalServer(scopes, nonce, callbackUri);
|
||||
- } catch (e) {
|
||||
- this._logger.error(e);
|
||||
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Starting a local server is only supported if:
|
||||
- // 1. We are in a UI extension because we need to open a port on the machine that has the browser
|
||||
- // 2. We are in a node runtime because we need to open a port on the machine
|
||||
- // 3. code exchange can only be done with a supported target
|
||||
- if (
|
||||
- this._extensionKind === vscode.ExtensionKind.UI &&
|
||||
- typeof navigator === 'undefined' &&
|
||||
- supportedTarget
|
||||
- ) {
|
||||
- try {
|
||||
- await promptToContinue();
|
||||
- return await this.doLoginWithLocalServer(scopes);
|
||||
- } catch (e) {
|
||||
- this._logger.error(e);
|
||||
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // We only can use the Device Code flow when we have a full node environment because of CORS.
|
||||
- if (typeof navigator === 'undefined') {
|
||||
- try {
|
||||
- await promptToContinue();
|
||||
- return await this.doLoginDeviceCodeFlow(scopes);
|
||||
- } catch (e) {
|
||||
- this._logger.error(e);
|
||||
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // In a supported environment, we can't use PAT auth because we use this auth for Settings Sync and it doesn't support PATs.
|
||||
- // With that said, GitHub Enterprise isn't used by Settings Sync so we can use PATs for that.
|
||||
- if (!supportedClient || this._type === AuthProviderType.githubEnterprise) {
|
||||
- try {
|
||||
- await promptToContinue();
|
||||
- return await this.doLoginWithPat(scopes);
|
||||
- } catch (e) {
|
||||
- this._logger.error(e);
|
||||
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||
- }
|
||||
+ try {
|
||||
+ return await this.doLoginWithPat(scopes);
|
||||
+ } catch (e) {
|
||||
+ this._logger.error(e);
|
||||
+ userCancelled = e.message ?? e === 'User Cancelled';
|
||||
}
|
||||
@@ -196,136 +91,2 @@ export class GitHubServer implements IGitHubServer {
|
||||
|
||||
- private async doLoginWithoutLocalServer(scopes: string, nonce: string, callbackUri: vscode.Uri): Promise<string> {
|
||||
- this._logger.info(`Trying without local server... (${scopes})`);
|
||||
- return await vscode.window.withProgress<string>({
|
||||
- location: vscode.ProgressLocation.Notification,
|
||||
- title: vscode.l10n.t({
|
||||
- message: 'Signing in to {0}...',
|
||||
- args: [this.baseUri.authority],
|
||||
- comment: ['The {0} will be a url, e.g. github.com']
|
||||
- }),
|
||||
- cancellable: true
|
||||
- }, async (_, token) => {
|
||||
- const existingNonces = this._pendingNonces.get(scopes) || [];
|
||||
- this._pendingNonces.set(scopes, [...existingNonces, nonce]);
|
||||
- const redirectUri = await this.getRedirectEndpoint();
|
||||
- const searchParams = new URLSearchParams([
|
||||
- ['client_id', CLIENT_ID],
|
||||
- ['redirect_uri', redirectUri],
|
||||
- ['scope', scopes],
|
||||
- ['state', encodeURIComponent(callbackUri.toString(true))]
|
||||
- ]);
|
||||
-
|
||||
- const uri = vscode.Uri.parse(this.baseUri.with({
|
||||
- path: '/login/oauth/authorize',
|
||||
- query: searchParams.toString()
|
||||
- }).toString(true));
|
||||
- await vscode.env.openExternal(uri);
|
||||
-
|
||||
- // Register a single listener for the URI callback, in case the user starts the login process multiple times
|
||||
- // before completing it.
|
||||
- let codeExchangePromise = this._codeExchangePromises.get(scopes);
|
||||
- if (!codeExchangePromise) {
|
||||
- codeExchangePromise = promiseFromEvent(this._uriHandler!.event, this.handleUri(scopes));
|
||||
- this._codeExchangePromises.set(scopes, codeExchangePromise);
|
||||
- }
|
||||
-
|
||||
- try {
|
||||
- return await Promise.race([
|
||||
- codeExchangePromise.promise,
|
||||
- new Promise<string>((_, reject) => setTimeout(() => reject('Timed out'), 300_000)), // 5min timeout
|
||||
- promiseFromEvent<any, any>(token.onCancellationRequested, (_, __, reject) => { reject('User Cancelled'); }).promise
|
||||
- ]);
|
||||
- } finally {
|
||||
- this._pendingNonces.delete(scopes);
|
||||
- codeExchangePromise?.cancel.fire();
|
||||
- this._codeExchangePromises.delete(scopes);
|
||||
- }
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- private async doLoginWithLocalServer(scopes: string): Promise<string> {
|
||||
- this._logger.info(`Trying with local server... (${scopes})`);
|
||||
- return await vscode.window.withProgress<string>({
|
||||
- location: vscode.ProgressLocation.Notification,
|
||||
- title: vscode.l10n.t({
|
||||
- message: 'Signing in to {0}...',
|
||||
- args: [this.baseUri.authority],
|
||||
- comment: ['The {0} will be a url, e.g. github.com']
|
||||
- }),
|
||||
- cancellable: true
|
||||
- }, async (_, token) => {
|
||||
- const redirectUri = await this.getRedirectEndpoint();
|
||||
- const searchParams = new URLSearchParams([
|
||||
- ['client_id', CLIENT_ID],
|
||||
- ['redirect_uri', redirectUri],
|
||||
- ['scope', scopes],
|
||||
- ]);
|
||||
-
|
||||
- const loginUrl = this.baseUri.with({
|
||||
- path: '/login/oauth/authorize',
|
||||
- query: searchParams.toString()
|
||||
- });
|
||||
- const server = new LoopbackAuthServer(path.join(__dirname, '../media'), loginUrl.toString(true));
|
||||
- const port = await server.start();
|
||||
-
|
||||
- let codeToExchange;
|
||||
- try {
|
||||
- vscode.env.openExternal(vscode.Uri.parse(`http://127.0.0.1:${port}/signin?nonce=${encodeURIComponent(server.nonce)}`));
|
||||
- const { code } = await Promise.race([
|
||||
- server.waitForOAuthResponse(),
|
||||
- new Promise<any>((_, reject) => setTimeout(() => reject('Timed out'), 300_000)), // 5min timeout
|
||||
- promiseFromEvent<any, any>(token.onCancellationRequested, (_, __, reject) => { reject('User Cancelled'); }).promise
|
||||
- ]);
|
||||
- codeToExchange = code;
|
||||
- } finally {
|
||||
- setTimeout(() => {
|
||||
- void server.stop();
|
||||
- }, 5000);
|
||||
- }
|
||||
-
|
||||
- const accessToken = await this.exchangeCodeForToken(codeToExchange);
|
||||
- return accessToken;
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- private async doLoginDeviceCodeFlow(scopes: string): Promise<string> {
|
||||
- this._logger.info(`Trying device code flow... (${scopes})`);
|
||||
-
|
||||
- // Get initial device code
|
||||
- const uri = this.baseUri.with({
|
||||
- path: '/login/device/code',
|
||||
- query: `client_id=${CLIENT_ID}&scope=${scopes}`
|
||||
- });
|
||||
- const result = await fetching(uri.toString(true), {
|
||||
- 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 button = vscode.l10n.t('Copy & Continue to GitHub');
|
||||
- const modalResult = await vscode.window.showInformationMessage(
|
||||
- vscode.l10n.t({ message: 'Your Code: {0}', args: [json.user_code], comment: ['The {0} will be a code, e.g. 123-456'] }),
|
||||
- {
|
||||
- modal: true,
|
||||
- detail: vscode.l10n.t('To finish authenticating, navigate to GitHub and paste in the above one-time code.')
|
||||
- }, button);
|
||||
-
|
||||
- if (modalResult !== button) {
|
||||
- throw new Error('User 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 this.waitForDeviceCodeAccessToken(json);
|
||||
- }
|
||||
-
|
||||
private async doLoginWithPat(scopes: string): Promise<string> {
|
||||
@@ -369,123 +130,2 @@ export class GitHubServer implements IGitHubServer {
|
||||
|
||||
- private async waitForDeviceCodeAccessToken(
|
||||
- json: IGitHubDeviceCodeResponse,
|
||||
- ): Promise<string> {
|
||||
- return await vscode.window.withProgress<string>({
|
||||
- location: vscode.ProgressLocation.Notification,
|
||||
- cancellable: true,
|
||||
- title: vscode.l10n.t({
|
||||
- message: 'Open [{0}]({0}) in a new tab and paste your one-time code: {1}',
|
||||
- args: [json.verification_uri, json.user_code],
|
||||
- comment: [
|
||||
- 'The [{0}]({0}) will be a url and the {1} will be a code, e.g. 123-456',
|
||||
- '{Locked="[{0}]({0})"}'
|
||||
- ]
|
||||
- })
|
||||
- }, async (_, token) => {
|
||||
- const refreshTokenUri = this.baseUri.with({
|
||||
- path: '/login/oauth/access_token',
|
||||
- query: `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('User Cancelled');
|
||||
- }
|
||||
- let accessTokenResult;
|
||||
- try {
|
||||
- accessTokenResult = await fetching(refreshTokenUri.toString(true), {
|
||||
- method: 'POST',
|
||||
- headers: {
|
||||
- Accept: 'application/json'
|
||||
- }
|
||||
- });
|
||||
- } catch {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (!accessTokenResult.ok) {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- const accessTokenJson = await accessTokenResult.json();
|
||||
-
|
||||
- if (accessTokenJson.error === 'authorization_pending') {
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (accessTokenJson.error) {
|
||||
- throw new Error(accessTokenJson.error_description);
|
||||
- }
|
||||
-
|
||||
- return accessTokenJson.access_token;
|
||||
- }
|
||||
-
|
||||
- throw new Error('Cancelled');
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- private handleUri: (scopes: string) => PromiseAdapter<vscode.Uri, string> =
|
||||
- (scopes) => (uri, resolve, reject) => {
|
||||
- const query = new URLSearchParams(uri.query);
|
||||
- const code = query.get('code');
|
||||
- const nonce = query.get('nonce');
|
||||
- if (!code) {
|
||||
- reject(new Error('No code'));
|
||||
- return;
|
||||
- }
|
||||
- if (!nonce) {
|
||||
- reject(new Error('No nonce'));
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- const acceptedNonces = this._pendingNonces.get(scopes) || [];
|
||||
- if (!acceptedNonces.includes(nonce)) {
|
||||
- // A common scenario of this happening is if you:
|
||||
- // 1. Trigger a sign in with one set of scopes
|
||||
- // 2. Before finishing 1, you trigger a sign in with a different set of scopes
|
||||
- // In this scenario we should just return and wait for the next UriHandler event
|
||||
- // to run as we are probably still waiting on the user to hit 'Continue'
|
||||
- this._logger.info('Nonce not found in accepted nonces. Skipping this execution...');
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- resolve(this.exchangeCodeForToken(code));
|
||||
- };
|
||||
-
|
||||
- private async exchangeCodeForToken(code: string): Promise<string> {
|
||||
- this._logger.info('Exchanging code for token...');
|
||||
-
|
||||
- const proxyEndpoints: { [providerId: string]: string } | undefined = await vscode.commands.executeCommand('workbench.getCodeExchangeProxyEndpoints');
|
||||
- const endpointUrl = proxyEndpoints?.github ? `${proxyEndpoints.github}login/oauth/access_token` : GITHUB_TOKEN_URL;
|
||||
-
|
||||
- const body = new URLSearchParams([['code', code]]);
|
||||
- if (this._type === AuthProviderType.githubEnterprise) {
|
||||
- body.append('github_enterprise', this.baseUri.toString(true));
|
||||
- body.append('redirect_uri', await this.getRedirectEndpoint());
|
||||
- }
|
||||
- const result = await fetching(endpointUrl, {
|
||||
- method: 'POST',
|
||||
- headers: {
|
||||
- Accept: 'application/json',
|
||||
- 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
- 'Content-Length': body.toString()
|
||||
-
|
||||
- },
|
||||
- body: body.toString()
|
||||
- });
|
||||
-
|
||||
- if (result.ok) {
|
||||
- const json = await result.json();
|
||||
- this._logger.info('Token exchange success!');
|
||||
- return json.access_token;
|
||||
- } else {
|
||||
- const text = await result.text();
|
||||
- const error = new Error(text);
|
||||
- error.name = 'GitHubTokenExchangeError';
|
||||
- throw error;
|
||||
- }
|
||||
- }
|
||||
-const VALID_DESKTOP_CALLBACK_SCHEMES = [
|
||||
- 'vscode',
|
||||
- 'vscode-insiders',
|
||||
- // On Windows, some browsers don't seem to redirect back to OSS properly.
|
||||
- // As a result, you get stuck in the auth flow. We exclude this from the
|
||||
- // list until we can figure out a way to fix this behavior in browsers.
|
||||
- // 'code-oss',
|
||||
- 'vscode-wsl',
|
||||
- 'vscode-exploration'
|
||||
-];
|
||||
-
|
||||
-export function isSupportedClient(uri: Uri): boolean {
|
||||
- return (
|
||||
- VALID_DESKTOP_CALLBACK_SCHEMES.includes(uri.scheme) ||
|
||||
- // vscode.dev & insiders.vscode.dev
|
||||
- /(?:^|\.)vscode\.dev$/.test(uri.authority) ||
|
||||
- // github.dev & codespaces
|
||||
- /(?:^|\.)github\.dev$/.test(uri.authority)
|
||||
- );
|
||||
+export function isSupportedClient(_uri: Uri): boolean {
|
||||
+ return false;
|
||||
}
|
||||
@@ -35,4 +18,4 @@ export function isSupportedTarget(type: AuthProviderType, gheUri?: Uri): boolean
|
||||
|
||||
-export function isHostedGitHubEnterprise(uri: Uri): boolean {
|
||||
- return /\.ghe\.com$/.test(uri.authority);
|
||||
+export function isHostedGitHubEnterprise(_uri: Uri): boolean {
|
||||
+ return false;
|
||||
}
|
||||
diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||
index 8c7e84a..2dd5cab 100644
|
||||
index d09cfa0..dacbde5 100644
|
||||
--- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||
+++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||
@@ -309,3 +309,3 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
|
||||
@@ -356,3 +356,3 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
|
||||
|
||||
- if (providers.length && !menus.length) {
|
||||
+ if (!menus.length) {
|
||||
const noAccountsAvailableAction = disposables.add(new Action('noAccountsAvailable', localize('noAccounts', "You are not signed in to any accounts"), undefined, false));
|
||||
diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||
index 68fcc20..93484ee 100644
|
||||
index f6c2f14..aa27b28 100644
|
||||
--- a/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||
+++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||
@@ -274,12 +274,2 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||
@@ -284,12 +284,2 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||
}
|
||||
-
|
||||
- if (!this._authenticationProviders.size) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
diff --git a/build/win32/code.iss b/build/win32/code.iss
|
||||
index d365ab1..1a02701 100644
|
||||
index 44c9f2f..454aa09 100644
|
||||
--- a/build/win32/code.iss
|
||||
+++ b/build/win32/code.iss
|
||||
@@ -28,3 +28,3 @@ ChangesEnvironment=true
|
||||
ChangesAssociations=true
|
||||
-MinVersion=6.2
|
||||
-MinVersion=10.0
|
||||
+MinVersion=6.1.7600
|
||||
SourceDir={#SourceDir}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
APP_NAME_LC=$( echo "${APP_NAME}" | awk '{print tolower($0)}' )
|
||||
APP_NAME_LC="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )"
|
||||
|
||||
npm install -g checksum
|
||||
|
||||
@@ -29,7 +30,7 @@ if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
security create-keychain -p mysecretpassword "${KEYCHAIN}"
|
||||
security set-keychain-settings -lut 21600 "${KEYCHAIN}"
|
||||
security unlock-keychain -p mysecretpassword "${KEYCHAIN}"
|
||||
security list-keychains -s `security list-keychains | xargs` "${KEYCHAIN}"
|
||||
security list-keychains -s "$(security list-keychains | xargs)" "${KEYCHAIN}"
|
||||
# security list-keychains -d user
|
||||
# security show-keychain-info ${KEYCHAIN}
|
||||
|
||||
@@ -75,7 +76,7 @@ elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-inno-updater"
|
||||
|
||||
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-archive"
|
||||
7z.exe a -tzip "../assets/${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" -x!CodeSignSummary*.md -x!tools "../VSCode-win32-${VSCODE_ARCH}/*" -r
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
|
||||
@@ -98,11 +99,6 @@ elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||
|
||||
cd ..
|
||||
|
||||
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||
echo "Moving ZIP"
|
||||
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip" "assets\\${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
|
||||
echo "Moving System EXE"
|
||||
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\system-setup\\VSCodeSetup.exe" "assets\\${APP_NAME}Setup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"
|
||||
@@ -179,8 +175,7 @@ fi
|
||||
|
||||
cd assets
|
||||
|
||||
for FILE in *
|
||||
do
|
||||
for FILE in *; do
|
||||
if [[ -f "${FILE}" ]]; then
|
||||
sum_file "${FILE}"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091,2154
|
||||
|
||||
set -e
|
||||
|
||||
@@ -21,70 +22,87 @@ cd vscode || { echo "'vscode' dir not found"; exit 1; }
|
||||
{ set +x; } 2>/dev/null
|
||||
|
||||
for file in ../patches/*.patch; do
|
||||
if [ -f "${file}" ]; then
|
||||
if [[ -f "${file}" ]]; then
|
||||
echo applying patch: "${file}";
|
||||
git apply --ignore-whitespace "${file}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo failed to apply patch "${file}" 1>&2
|
||||
if ! git apply --ignore-whitespace "${file}"; then
|
||||
echo failed to apply patch "${file}" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
for file in ../patches/insider/*.patch; do
|
||||
if [ -f "${file}" ]; then
|
||||
if [[ -f "${file}" ]]; then
|
||||
echo applying patch: "${file}";
|
||||
git apply --ignore-whitespace "${file}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo failed to apply patch "${file}" 1>&2
|
||||
if ! git apply --ignore-whitespace "${file}"; then
|
||||
echo failed to apply patch "${file}" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for file in ../patches/user/*.patch; do
|
||||
if [ -f "${file}" ]; then
|
||||
if [[ -f "${file}" ]]; then
|
||||
echo applying user patch: "${file}";
|
||||
git apply --ignore-whitespace "${file}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo failed to apply patch "${file}" 1>&2
|
||||
if ! git apply --ignore-whitespace "${file}"; then
|
||||
echo failed to apply patch "${file}" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
set -x
|
||||
|
||||
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
||||
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
||||
|
||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --network-timeout 180000
|
||||
|
||||
yarn postinstall
|
||||
elif [[ "${npm_config_arch}" == "armv7l" || "${npm_config_arch}" == "ia32" ]]; then
|
||||
# node-gyp@9.0.0 shipped with node@16.15.0 starts using config.gypi
|
||||
# from the custom headers path if dist-url option was set, instead of
|
||||
# using the config value from the process. Electron builds with pointer compression
|
||||
# enabled for x64 and arm64, but incorrectly ships a single copy of config.gypi
|
||||
# with v8_enable_pointer_compression option always set for all target architectures.
|
||||
# We use the force_process_config option to use the config.gypi from the
|
||||
# nodejs process executing npm for 32-bit architectures.
|
||||
export npm_config_force_process_config="true"
|
||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
||||
else
|
||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
||||
if [[ "${npm_config_arch}" == "arm" ]]; then
|
||||
export npm_config_arm_version=7
|
||||
elif [[ "${npm_config_arch}" == "ia32" ]]; then
|
||||
# TODO: Should be replaced with upstream URL once https://github.com/nodejs/node-gyp/pull/2825
|
||||
# gets merged.
|
||||
rm -rf .build/node-gyp
|
||||
mkdir -p .build/node-gyp
|
||||
cd .build/node-gyp
|
||||
|
||||
git clone https://github.com/rzhao271/node-gyp.git .
|
||||
git checkout 102b347da0c92c29f9c67df22e864e70249cf086
|
||||
npm install
|
||||
|
||||
npm_config_node_gyp=$( pwd )
|
||||
export npm_config_node_gyp
|
||||
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --network-timeout 180000
|
||||
fi
|
||||
|
||||
setpath() {
|
||||
local jsonTmp
|
||||
{ set +x; } 2>/dev/null
|
||||
echo "$( cat "${1}.json" | jq --arg 'path' "${2}" --arg 'value' "${3}" 'setpath([$path]; $value)' )" > "${1}.json"
|
||||
jsonTmp=$( jq --arg 'path' "${2}" --arg 'value' "${3}" 'setpath([$path]; $value)' "${1}.json" )
|
||||
echo "${jsonTmp}" > "${1}.json"
|
||||
set -x
|
||||
}
|
||||
|
||||
setpath_json() {
|
||||
local jsonTmp
|
||||
{ set +x; } 2>/dev/null
|
||||
echo "$( cat "${1}.json" | jq --arg 'path' "${2}" --argjson 'value' "${3}" 'setpath([$path]; $value)' )" > "${1}.json"
|
||||
jsonTmp=$( jq --arg 'path' "${2}" --argjson 'value' "${3}" 'setpath([$path]; $value)' "${1}.json" )
|
||||
echo "${jsonTmp}" > "${1}.json"
|
||||
set -x
|
||||
}
|
||||
|
||||
# product.json
|
||||
cp product.json product.json.bak
|
||||
cp product.json{,.bak}
|
||||
|
||||
setpath "product" "checksumFailMoreInfoUrl" "https://go.microsoft.com/fwlink/?LinkId=828886"
|
||||
setpath "product" "documentationUrl" "https://go.microsoft.com/fwlink/?LinkID=533484#vscode"
|
||||
@@ -153,20 +171,21 @@ else
|
||||
setpath "product" "win32arm64UserAppId" "{{57FD70A5-1B8D-4875-9F40-C5553F094828}"
|
||||
fi
|
||||
|
||||
echo "$( jq -s '.[0] * .[1]' product.json ../product.json )" > product.json
|
||||
jsonTmp=$( jq -s '.[0] * .[1]' product.json ../product.json )
|
||||
echo "${jsonTmp}" > product.json && unset jsonTmp
|
||||
|
||||
cat product.json
|
||||
|
||||
# package.json
|
||||
cp package.json package.json.bak
|
||||
cp package.json{,.bak}
|
||||
|
||||
setpath "package" "version" $( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\1/p" )
|
||||
setpath "package" "release" $( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\2/p" )
|
||||
setpath "package" "version" "$( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\1/p" )"
|
||||
setpath "package" "release" "$( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\2/p" )"
|
||||
|
||||
replace 's|Microsoft Corporation|VSCodium|' package.json
|
||||
|
||||
# announcements
|
||||
replace "s|\\[\\/\\* BUILTIN_ANNOUNCEMENTS \\*\\/\\]|$( cat ../announcements-builtin.json | tr -d '\n' )|" src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||
replace "s|\\[\\/\\* BUILTIN_ANNOUNCEMENTS \\*\\/\\]|$( tr -d '\n' < ../announcements-builtin.json )|" src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||
|
||||
../undo_telemetry.sh
|
||||
|
||||
|
||||
67
product.json
@@ -48,8 +48,7 @@
|
||||
],
|
||||
"extensionEnabledApiProposals": {
|
||||
"ms-vscode.vscode-selfhost-test-provider": [
|
||||
"testObserver",
|
||||
"testContinuousRun"
|
||||
"testObserver"
|
||||
],
|
||||
"VisualStudioExptTeam.vscodeintellicode-completions": [
|
||||
"inlineCompletionsAdditions"
|
||||
@@ -57,6 +56,7 @@
|
||||
"ms-vsliveshare.vsliveshare": [
|
||||
"contribMenuBarHome",
|
||||
"contribShareMenu",
|
||||
"contribStatusBarItems",
|
||||
"diffCommand",
|
||||
"documentFiltersExclusive",
|
||||
"fileSearchProvider",
|
||||
@@ -79,9 +79,14 @@
|
||||
"ms-python.python": [
|
||||
"contribEditorContentMenu",
|
||||
"quickPickSortByLabel",
|
||||
"portsAttributes",
|
||||
"testObserver",
|
||||
"envShellEvent",
|
||||
"quickPickItemTooltip"
|
||||
"quickPickItemTooltip",
|
||||
"terminalDataWriteEvent",
|
||||
"envCollectionWorkspace",
|
||||
"saveEditor",
|
||||
"envCollectionOptions"
|
||||
],
|
||||
"ms-dotnettools.dotnet-interactive-vscode": [
|
||||
"notebookMessaging"
|
||||
@@ -103,8 +108,7 @@
|
||||
"textSearchProvider"
|
||||
],
|
||||
"ms-vscode.remote-repositories": [
|
||||
"contribEditorLineNumberMenu",
|
||||
"contribEditorGutterMenu",
|
||||
"canonicalUriProvider",
|
||||
"contribEditSessions",
|
||||
"contribRemoteHelp",
|
||||
"contribMenuBarHome",
|
||||
@@ -117,6 +121,7 @@
|
||||
"fileSearchProvider",
|
||||
"quickPickSortByLabel",
|
||||
"workspaceTrust",
|
||||
"shareProvider",
|
||||
"scmActionButton",
|
||||
"scmSelectedProvider",
|
||||
"scmValidation",
|
||||
@@ -138,7 +143,8 @@
|
||||
"telemetry"
|
||||
],
|
||||
"ms-vscode.remote-server": [
|
||||
"resolvers"
|
||||
"resolvers",
|
||||
"tunnels"
|
||||
],
|
||||
"ms-vscode.remote-explorer": [
|
||||
"contribRemoteHelp",
|
||||
@@ -164,23 +170,39 @@
|
||||
"documentFiltersExclusive"
|
||||
],
|
||||
"GitHub.vscode-pull-request-github": [
|
||||
"contribEditorLineNumberMenu",
|
||||
"contribEditorGutterMenu",
|
||||
"contribCommentThreadAdditionalMenu",
|
||||
"tokenInformation",
|
||||
"contribShareMenu",
|
||||
"fileComments",
|
||||
"contribCommentPeekContext",
|
||||
"treeItemCheckbox",
|
||||
"codiconDecoration",
|
||||
"diffCommand",
|
||||
"contribCommentEditorActionsMenu",
|
||||
"quickDiffProvider"
|
||||
"readonlyMessage",
|
||||
"shareProvider",
|
||||
"quickDiffProvider",
|
||||
"quickPickItemIcon"
|
||||
],
|
||||
"GitHub.copilot": [
|
||||
"inlineCompletionsAdditions"
|
||||
"inlineCompletionsAdditions",
|
||||
"interactive",
|
||||
"interactiveUserActions",
|
||||
"semanticSimilarity",
|
||||
"terminalDataWriteEvent"
|
||||
],
|
||||
"GitHub.copilot-nightly": [
|
||||
"inlineCompletionsAdditions"
|
||||
"inlineCompletionsAdditions",
|
||||
"interactive",
|
||||
"interactiveUserActions",
|
||||
"semanticSimilarity",
|
||||
"terminalDataWriteEvent"
|
||||
],
|
||||
"GitHub.copilot-chat": [
|
||||
"handleIssueUri",
|
||||
"interactive",
|
||||
"interactiveUserActions",
|
||||
"semanticSimilarity",
|
||||
"terminalDataWriteEvent"
|
||||
],
|
||||
"GitHub.remotehub": [
|
||||
"contribRemoteHelp",
|
||||
@@ -207,7 +229,6 @@
|
||||
"contribNotebookStaticPreloads"
|
||||
],
|
||||
"ms-toolsai.jupyter": [
|
||||
"notebookControllerKind",
|
||||
"notebookDeprecated",
|
||||
"notebookMessaging",
|
||||
"notebookMime",
|
||||
@@ -218,7 +239,8 @@
|
||||
"interactiveWindow",
|
||||
"notebookControllerAffinityHidden",
|
||||
"contribNotebookStaticPreloads",
|
||||
"quickPickItemTooltip"
|
||||
"quickPickItemTooltip",
|
||||
"notebookExecution"
|
||||
],
|
||||
"dbaeumer.vscode-eslint": [
|
||||
"notebookCellExecutionState"
|
||||
@@ -229,6 +251,9 @@
|
||||
"ms-azuretools.vscode-azureappservice": [
|
||||
"terminalDataWriteEvent"
|
||||
],
|
||||
"ms-azuretools.vscode-azureresourcegroups": [
|
||||
"authGetSessions"
|
||||
],
|
||||
"ms-vscode.anycode": [
|
||||
"extensionsAny"
|
||||
],
|
||||
@@ -241,6 +266,20 @@
|
||||
"ms-dotnettools.csdevkit": [
|
||||
"inlineCompletionsAdditions"
|
||||
],
|
||||
"ms-dotnettools.vscodeintellicode-csharp": [
|
||||
"inlineCompletionsAdditions"
|
||||
],
|
||||
"digitarald.chat-plugins": [
|
||||
"interactiveSlashCommands"
|
||||
],
|
||||
"microsoft-IsvExpTools.powerplatform-vscode": [
|
||||
"fileSearchProvider",
|
||||
"textSearchProvider"
|
||||
],
|
||||
"microsoft-IsvExpTools.powerplatform-vscode-preview": [
|
||||
"fileSearchProvider",
|
||||
"textSearchProvider"
|
||||
],
|
||||
"jeanp413.open-remote-ssh": [
|
||||
"resolvers",
|
||||
"tunnels",
|
||||
|
||||
10
release.sh
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
@@ -19,7 +19,7 @@ if [[ $( gh release view --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" 2>&1
|
||||
NOTES="update vscode to [${MS_COMMIT}](https://github.com/microsoft/vscode/tree/${MS_COMMIT})"
|
||||
CREATE_OPTIONS=""
|
||||
else
|
||||
NOTES="update vscode to [${MS_TAG}](https://code.visualstudio.com/updates/v$( echo ${MS_TAG//./_} | cut -d'_' -f 1,2 ))"
|
||||
NOTES="update vscode to [${MS_TAG}](https://code.visualstudio.com/updates/v$( echo "${MS_TAG//./_}" | cut -d'_' -f 1,2 ))"
|
||||
CREATE_OPTIONS="--generate-notes"
|
||||
fi
|
||||
|
||||
@@ -30,8 +30,7 @@ cd assets
|
||||
|
||||
set +e
|
||||
|
||||
for FILE in *
|
||||
do
|
||||
for FILE in *; do
|
||||
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
|
||||
echo "::group::Uploading '${FILE}' at $( date "+%T" )"
|
||||
gh release upload --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
@@ -40,8 +39,7 @@ do
|
||||
echo "exit: ${EXIT_STATUS}"
|
||||
|
||||
if (( "${EXIT_STATUS}" )); then
|
||||
for (( i=0; i<10; i++ ))
|
||||
do
|
||||
for (( i=0; i<10; i++ )); do
|
||||
github-release delete --owner "${REPOSITORY_OWNER}" --repo "${REPOSITORY_NAME}" --tag "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
|
||||
sleep $(( 15 * (i + 1)))
|
||||
|
||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 429 KiB |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 418 KiB |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 157 KiB |
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
@@ -12,11 +12,11 @@ sudo snap install --channel stable --classic snapcraft
|
||||
|
||||
echo "Architecture: ${ARCHITECTURE}"
|
||||
|
||||
SNAP_VERSION=$(snapcraft list-revisions ${SNAP_NAME} | grep -F "stable*" | grep "${ARCHITECTURE}" | tr -s ' ' | cut -d ' ' -f 4)
|
||||
SNAP_VERSION=$( snapcraft list-revisions "${SNAP_NAME}" | grep -F "stable*" | grep "${ARCHITECTURE}" | tr -s ' ' | cut -d ' ' -f 4 )
|
||||
echo "Snap version: ${SNAP_VERSION}"
|
||||
|
||||
wget --quiet "https://api.github.com/repos/${ASSETS_REPOSITORY}/releases" -O gh_latest.json
|
||||
GH_VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' 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
|
||||
@@ -27,7 +27,7 @@ else
|
||||
export SHOULD_DEPLOY="yes"
|
||||
|
||||
snap version
|
||||
snap info "${SNAP_NAME}" | true
|
||||
snap info "${SNAP_NAME}" || true
|
||||
fi
|
||||
|
||||
if [[ "${GITHUB_ENV}" ]]; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091,SC2016
|
||||
|
||||
set -ex
|
||||
|
||||
@@ -25,7 +26,7 @@ else
|
||||
fi
|
||||
export -f replace_with_debug
|
||||
|
||||
d1=`date +%s`
|
||||
d1=$( date +%s )
|
||||
|
||||
if [[ "${OS_NAME}" == "linux" ]]; then
|
||||
if [[ ${VSCODE_ARCH} == "x64" ]]; then
|
||||
@@ -39,6 +40,6 @@ else
|
||||
./node_modules/@vscode/ripgrep/bin/rg --no-ignore --path-separator=// -l "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
|
||||
fi
|
||||
|
||||
d2=`date +%s`
|
||||
d2=$( date +%s )
|
||||
|
||||
echo "undo_telemetry: $( echo $((${d2} - ${d1})) )s"
|
||||
echo "undo_telemetry: $((d2 - d1))s"
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||
echo "Will not update version JSON because we did not build"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||
echo "Will not update insider.json because no GITHUB_TOKEN defined"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "$( cat "insider.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )" > "insider.json"
|
||||
jsonTmp=$( jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. "insider.json" | .tag=$tag | .commit=$commit' )
|
||||
echo "${jsonTmp}" > "insider.json" && unset jsonTmp
|
||||
|
||||
git config user.email "$( echo "${GITHUB_USERNAME}" | awk '{print tolower($0)}' )-ci@not-real.com"
|
||||
git config user.name "${GITHUB_USERNAME} CI"
|
||||
@@ -20,7 +21,7 @@ git add .
|
||||
|
||||
CHANGES=$( git status --porcelain )
|
||||
|
||||
if [[ ! -z "${CHANGES}" ]]; then
|
||||
if [[ -n "${CHANGES}" ]]; then
|
||||
git commit -m "build(insider): update to commit ${MS_COMMIT:0:7}"
|
||||
|
||||
if ! git push origin insider --quiet; then
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# shellcheck disable=SC1091,2148
|
||||
|
||||
DEFAULT_TRUE="'default': true"
|
||||
DEFAULT_FALSE="'default': false"
|
||||
DEFAULT_ON="'default': TelemetryConfiguration.ON"
|
||||
@@ -10,23 +12,25 @@ NLS=workbench.settings.enableNaturalLanguageSearch
|
||||
. ../utils.sh
|
||||
|
||||
update_setting () {
|
||||
local FILENAME="${2}"
|
||||
local FILENAME SETTING LINE_NUM IN_SETTING FOUND DEFAULT_TRUE_TO_FALSE
|
||||
|
||||
FILENAME="${2}"
|
||||
# check that the file exists
|
||||
if [ ! -f "${FILENAME}" ]; then
|
||||
if [[ ! -f "${FILENAME}" ]]; then
|
||||
echo "File to update setting in does not exist ${FILENAME}"
|
||||
return
|
||||
fi
|
||||
|
||||
# go through lines of file, looking for block that contains setting
|
||||
local SETTING="${1}"
|
||||
local LINE_NUM=0
|
||||
SETTING="${1}"
|
||||
LINE_NUM=0
|
||||
while read -r line; do
|
||||
local LINE_NUM=$(( $LINE_NUM + 1 ))
|
||||
LINE_NUM=$(( LINE_NUM + 1 ))
|
||||
if [[ "${line}" == *"${SETTING}"* ]]; then
|
||||
local IN_SETTING=1
|
||||
IN_SETTING=1
|
||||
fi
|
||||
if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"*) && "${IN_SETTING}" == "1" ]]; then
|
||||
local FOUND=1
|
||||
FOUND=1
|
||||
break
|
||||
fi
|
||||
done < "${FILENAME}"
|
||||
@@ -38,9 +42,9 @@ update_setting () {
|
||||
|
||||
# construct line-aware replacement string
|
||||
if [[ "${line}" == *"${DEFAULT_TRUE}"* ]]; then
|
||||
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
|
||||
DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
|
||||
else
|
||||
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/"
|
||||
DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/"
|
||||
fi
|
||||
|
||||
replace "${DEFAULT_TRUE_TO_FALSE}" "${FILENAME}"
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${SHOULD_BUILD}" != "yes" && "${FORCE_UPDATE}" != "true" ]]; then
|
||||
echo "Will not update version JSON because we did not build"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||
echo "Will not update version JSON because no GITHUB_TOKEN defined"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${FORCE_UPDATE}" == "true" ]]; then
|
||||
@@ -18,7 +19,12 @@ fi
|
||||
|
||||
if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
||||
echo "Will not update version JSON because no BUILD_SOURCEVERSION defined"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
|
||||
echo "Skip ppc64le since only reh is published"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# {
|
||||
@@ -44,22 +50,23 @@ REPOSITORY_NAME="${VERSIONS_REPOSITORY/*\//}"
|
||||
URL_BASE="https://github.com/${ASSETS_REPOSITORY}/releases/download/${RELEASE_VERSION}"
|
||||
|
||||
generateJson() {
|
||||
local url name version productVersion sha1hash sha256hash timestamp
|
||||
JSON_DATA="{}"
|
||||
|
||||
# generate parts
|
||||
local url="${URL_BASE}/${ASSET_NAME}"
|
||||
local name="${RELEASE_VERSION}"
|
||||
local version="${BUILD_SOURCEVERSION}"
|
||||
local productVersion="${RELEASE_VERSION}"
|
||||
local timestamp=$(node -e 'console.log(Date.now())')
|
||||
url="${URL_BASE}/${ASSET_NAME}"
|
||||
name="${RELEASE_VERSION}"
|
||||
version="${BUILD_SOURCEVERSION}"
|
||||
productVersion="${RELEASE_VERSION}"
|
||||
timestamp=$( node -e 'console.log(Date.now())' )
|
||||
|
||||
if [[ ! -f "assets/${ASSET_NAME}" ]]; then
|
||||
echo "Downloading asset '${ASSET_NAME}'"
|
||||
gh release download --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" --dir "assets" --pattern "${ASSET_NAME}*"
|
||||
fi
|
||||
|
||||
local sha1hash=$(cat "assets/${ASSET_NAME}.sha1" | awk '{ print $1 }')
|
||||
local sha256hash=$(cat "assets/${ASSET_NAME}.sha256" | awk '{ print $1 }')
|
||||
sha1hash=$( awk '{ print $1 }' "assets/${ASSET_NAME}.sha1" )
|
||||
sha256hash=$( awk '{ print $1 }' "assets/${ASSET_NAME}.sha256" )
|
||||
|
||||
# check that nothing is blank (blank indicates something awry with build)
|
||||
for key in url name version productVersion sha1hash timestamp sha256hash; do
|
||||
@@ -70,7 +77,7 @@ generateJson() {
|
||||
done
|
||||
|
||||
# generate json
|
||||
JSON_DATA=$(jq \
|
||||
JSON_DATA=$( jq \
|
||||
--arg url "${url}" \
|
||||
--arg name "${name}" \
|
||||
--arg version "${version}" \
|
||||
@@ -79,26 +86,31 @@ generateJson() {
|
||||
--arg timestamp "${timestamp}" \
|
||||
--arg sha256hash "${sha256hash}" \
|
||||
'. | .url=$url | .name=$name | .version=$version | .productVersion=$productVersion | .hash=$hash | .timestamp=$timestamp | .sha256hash=$sha256hash' \
|
||||
<<<'{}')
|
||||
<<<'{}' )
|
||||
}
|
||||
|
||||
updateLatestVersion() {
|
||||
echo "Generating ${VERSION_PATH}/latest.json"
|
||||
echo "Updating ${VERSION_PATH}/latest.json"
|
||||
|
||||
# do not update the same version
|
||||
if [[ -f "versions/${VERSION_PATH}/latest.json" ]]; then
|
||||
CURRENT_VERSION=$( jq -r '.name' "versions/${VERSION_PATH}/latest.json" )
|
||||
if [[ -f "${REPOSITORY_NAME}/${VERSION_PATH}/latest.json" ]]; then
|
||||
CURRENT_VERSION=$( jq -r '.name' "${REPOSITORY_NAME}/${VERSION_PATH}/latest.json" )
|
||||
echo "CURRENT_VERSION: ${CURRENT_VERSION}"
|
||||
|
||||
if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" && "${FORCE_UPDATE}" != "true" ]]; then
|
||||
return
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "versions/${VERSION_PATH}"
|
||||
echo "Generating ${VERSION_PATH}/latest.json"
|
||||
|
||||
mkdir -p "${REPOSITORY_NAME}/${VERSION_PATH}"
|
||||
|
||||
generateJson
|
||||
|
||||
echo "${JSON_DATA}" > "versions/${VERSION_PATH}/latest.json"
|
||||
echo "${JSON_DATA}" > "${REPOSITORY_NAME}/${VERSION_PATH}/latest.json"
|
||||
|
||||
echo "${JSON_DATA}"
|
||||
}
|
||||
|
||||
# init versions repo for later commiting + pushing the json file to it
|
||||
@@ -108,7 +120,7 @@ cd "${REPOSITORY_NAME}" || { echo "'${REPOSITORY_NAME}' dir not found"; exit 1;
|
||||
git config user.email "$( echo "${GITHUB_USERNAME}" | awk '{print tolower($0)}' )-ci@not-real.com"
|
||||
git config user.name "${GITHUB_USERNAME} CI"
|
||||
git remote rm origin
|
||||
git remote add origin "https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${VERSIONS_REPOSITORY}.git" > /dev/null 2>&1
|
||||
git remote add origin "https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${VERSIONS_REPOSITORY}.git" &> /dev/null
|
||||
cd ..
|
||||
|
||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
@@ -158,13 +170,19 @@ git add .
|
||||
|
||||
CHANGES=$( git status --porcelain )
|
||||
|
||||
if [[ ! -z "${CHANGES}" ]]; then
|
||||
if [[ -n "${CHANGES}" ]]; then
|
||||
echo "Some changes have been found, pushing them"
|
||||
|
||||
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
|
||||
else
|
||||
echo "No changes"
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
||||
6
utils.sh
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# All common functions can be added to this file
|
||||
|
||||
exists() { type -t "$1" > /dev/null 2>&1; }
|
||||
exists() { type -t "$1" &> /dev/null; }
|
||||
|
||||
is_gnu_sed () {
|
||||
sed --version >/dev/null 2>&1
|
||||
sed --version &> /dev/null
|
||||
}
|
||||
|
||||
replace () {
|
||||
|
||||
10
version.sh
@@ -1,13 +1,13 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
||||
|
||||
if type -t "sha1sum" > /dev/null 2>&1; then
|
||||
export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | sha1sum | cut -d' ' -f1 )
|
||||
if type -t "sha1sum" &> /dev/null; then
|
||||
BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | sha1sum | cut -d' ' -f1 )
|
||||
else
|
||||
npm install -g checksum
|
||||
|
||||
export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | checksum )
|
||||
BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | checksum )
|
||||
fi
|
||||
|
||||
echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\""
|
||||
@@ -17,3 +17,5 @@ if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
||||
echo "BUILD_SOURCEVERSION=${BUILD_SOURCEVERSION}" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
fi
|
||||
|
||||
export BUILD_SOURCEVERSION
|
||||