Skip to content

Commit

Permalink
Merge branch 'master' into insider
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Jul 18, 2023
2 parents e8161f6 + d6b7880 commit 11083b9
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 79 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/insider-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Install Yarn
run: npm install -g yarn
Expand Down Expand Up @@ -117,6 +117,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 }}
Expand Down Expand Up @@ -162,7 +163,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Install Yarn
run: npm install -g yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/insider-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Clone VSCode repo
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/insider-spearhead.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Clone VSCode repo
run: . get_repo.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/insider-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Install Yarn
run: npm install -g yarn
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/stable-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Install Yarn
run: npm install -g yarn
Expand Down Expand Up @@ -114,6 +114,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 }}
Expand Down Expand Up @@ -157,7 +158,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Install Yarn
run: npm install -g yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stable-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Clone VSCode repo
run: . get_repo.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stable-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '16.17'
node-version: '16'

- name: Install Yarn
run: npm install -g yarn
Expand Down
18 changes: 9 additions & 9 deletions get_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ 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)
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
Expand All @@ -41,22 +41,22 @@ 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)
else
echo "No MS_COMMIT for ${RELEASE_VERSION}"
echo "Error: No MS_COMMIT for ${RELEASE_VERSION}"
exit 1
fi
else
if [[ "${RELEASE_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+$ ]];
then
MS_TAG="${BASH_REMATCH[1]}"
else
echo "Bad RELEASE_VERSION: ${RELEASE_VERSION}"
echo "Error: Bad RELEASE_VERSION: ${RELEASE_VERSION}"
exit 1
fi
fi
Expand All @@ -73,23 +73,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' )
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]}"
else
echo "The following reference can't be parsed: ${REFERENCE}"
echo "Error: The following reference can't be parsed: ${REFERENCE}"
exit 1
fi
fi
Expand Down
Loading

0 comments on commit 11083b9

Please sign in to comment.