88 # if it doesn't, we add it
99 if ! git config remote.vscode.url > /dev/null; then
1010 echo " Could not find 'vscode' as a remote"
11- echo " Adding with: git remote add -f vscode https://github.com/microsoft/vscode.git &> /dev/null"
12- echo " Supressing output with '&> /dev/null'"
13- git remote add -f vscode https://github.com/microsoft/vscode.git & > /dev/null
11+ echo " Adding with: git remote add vscode https://github.com/microsoft/vscode.git"
12+ git remote add vscode https://github.com/microsoft/vscode.git
1413 fi
1514
1615 # Ask which version we should update to
@@ -25,7 +24,18 @@ main() {
2524 exit 1
2625 fi
2726
28- echo -e " Great! We'll prep a PR for updating to $VSCODE_VERSION_TO_UPDATE \n"
27+ # Check that they have jq installed
28+ if ! command -v jq & > /dev/null; then
29+ echo " jq could not be found."
30+ echo " We use this when looking up the exact version to update to in the package.json in VS Code."
31+ echo -e " See docs here: https://stedolan.github.io/jq/download/"
32+ exit
33+ fi
34+
35+ # Grab the exact version from package.json
36+ VSCODE_EXACT_VERSION=$( curl -s " https://raw.githubusercontent.com/microsoft/vscode/release/$VSCODE_VERSION_TO_UPDATE /package.json" | jq -r " .version" )
37+
38+ echo -e " Great! We'll prep a PR for updating to $VSCODE_EXACT_VERSION \n"
2939
3040 # Check if GitHub CLI is installed
3141 if ! command -v gh & > /dev/null; then
@@ -47,7 +57,7 @@ main() {
4757
4858 echo " Opening a draft PR on GitHub"
4959 # To read about these flags, visit the docs: https://cli.github.com/manual/gh_pr_create
50- gh pr create --base master --title " feat(vscode): update to version $VSCODE_VERSION_TO_UPDATE " --body " This PR updates vscode to version: $VSCODE_VERSION_TO_UPDATE " --reviewer @cdr/code-server-reviewers --repo cdr/code-server --draft
60+ gh pr create --base master --title " feat(vscode): update to version $VSCODE_EXACT_VERSION " --body " This PR updates vscode to version: $VSCODE_EXACT_VERSION " --reviewer @cdr/code-server-reviewers --repo cdr/code-server --draft
5161
5262 echo " Going to try to update vscode for you..."
5363 echo -e " Running: git subtree pull --prefix lib/vscode vscode release/${VSCODE_VERSION_TO_UPDATE} --squash\n"
0 commit comments