2018-08-13 14:24:40 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-09-16 14:18:02 -04:00
|
|
|
# figure out latest tag by calling MS update API
|
|
|
|
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
|
2020-09-16 14:21:30 -04:00
|
|
|
export LATEST_MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
|
|
|
|
export LATEST_MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
|
2018-08-13 14:24:40 -04:00
|
|
|
echo "Got the latest MS tag: ${LATEST_MS_TAG}"
|
2020-09-16 14:18:02 -04:00
|
|
|
|
|
|
|
git clone https://github.com/Microsoft/vscode.git --branch $LATEST_MS_TAG --depth 1
|
|
|
|
|
2020-10-06 00:30:07 -04:00
|
|
|
# for GH actions
|
|
|
|
if [[ "$CI_WINDOWS" != "True" ]]; then
|
|
|
|
echo "LATEST_MS_COMMIT=$LATEST_MS_COMMIT" >> $GITHUB_ENV
|
|
|
|
echo "LATEST_MS_TAG=$LATEST_MS_TAG" >> $GITHUB_ENV
|
|
|
|
fi
|
2020-10-05 19:31:17 -04:00
|
|
|
|