Add support to build insider latest build: $ INSIDER=1 ./build/build_mac.sh (#784)
This commit is contained in:
parent
2abbfed911
commit
51ee66e019
1 changed files with 14 additions and 3 deletions
17
get_repo.sh
17
get_repo.sh
|
@ -1,12 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# figure out latest tag by calling MS update API
|
||||
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
|
||||
if [ "$INSIDER" == "1" ]; then
|
||||
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol)
|
||||
else
|
||||
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
|
||||
fi
|
||||
export LATEST_MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
|
||||
export LATEST_MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
|
||||
echo "Got the latest MS tag: ${LATEST_MS_TAG}"
|
||||
echo "Got the latest MS tag: ${LATEST_MS_TAG} version: ${LATEST_MS_COMMIT}"
|
||||
|
||||
git clone https://github.com/Microsoft/vscode.git --branch $LATEST_MS_TAG --depth 1
|
||||
if [ "$INSIDER" == "1" ]; then
|
||||
mkdir -p vscode; cd vscode
|
||||
git init ; git remote add origin https://github.com/Microsoft/vscode.git
|
||||
git fetch --depth 1 origin $LATEST_MS_COMMIT; git checkout FETCH_HEAD
|
||||
cd ..
|
||||
else
|
||||
git clone https://github.com/Microsoft/vscode.git --branch $LATEST_MS_TAG --depth 1
|
||||
fi
|
||||
|
||||
# for GH actions
|
||||
if [[ $GITHUB_ENV ]]; then
|
||||
|
|
Loading…
Reference in a new issue