|
1 | 1 | #!/usr/bin/env bash
|
| 2 | +# Description: This is a script to make the process of updating vscode versions easier |
| 3 | +# Run it with `yarn update:vscode` and it will do the following: |
| 4 | +# 1. Check that you have a remote called `vscode` |
| 5 | +# 2. Ask you which version you want to upgrade to |
| 6 | +# 3. Grab the exact version from the package.json i.e. 1.53.2 |
| 7 | +# 4. Fetch the vscode remote branches to run the subtree update |
| 8 | +# 5. Run the subtree update and pull in the vscode update |
| 9 | +# 6. Commit the changes (including merge conflicts) |
| 10 | +# 7. Open a draft PR |
| 11 | + |
2 | 12 | set -euo pipefail
|
3 | 13 |
|
4 | 14 | # This function expects two arguments
|
@@ -89,12 +99,15 @@ main() {
|
89 | 99 | # so we can list them in the PR body
|
90 | 100 | CONFLICTS=$(git diff --name-only --diff-filter=U | while read line; do echo "- $line"; done)
|
91 | 101 |
|
92 |
| - PR_BODY=$(make_pr_body $VSCODE_EXACT_VERSION $CONFLICTS) |
| 102 | + PR_BODY=$(make_pr_body "$VSCODE_EXACT_VERSION" "$CONFLICTS") |
| 103 | +
|
| 104 | + echo "Here is the PR Body" |
| 105 | + echo "$PR_BODY" |
93 | 106 |
|
94 |
| - echo "Forcing a commit with conflicts" |
| 107 | + echo -e "\nForcing a commit with conflicts" |
95 | 108 | echo "Note: this is intentional"
|
96 | 109 | echo "If we don't do this, code review is impossible."
|
97 |
| - echo "For more info, see docs: docs/CONTRIBUTING.md#updating-vs-code" |
| 110 | + echo -e "For more info, see docs: docs/CONTRIBUTING.md#updating-vs-code\n" |
98 | 111 | git add . && git commit -am "chore(vscode): update to $VSCODE_EXACT_VERSION"
|
99 | 112 |
|
100 | 113 | # Note: we can't open a draft PR unless their are changes.
|
|
0 commit comments