File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 99
1010set -euo pipefail
1111
12+ CHECKMARK=" \xE2\x9C\x94"
13+ DASH=" -"
14+
1215main () {
1316 if [ " ${DRY_RUN-} " = 1 ]; then
1417 echo " Performing a dry run..."
@@ -76,11 +79,12 @@ main() {
7679 CODE_SERVER_CURRENT_VERSION=$( node -pe " require('./package.json').version" )
7780 # Ask which version we should update to
7881 # In the future, we'll automate this and determine the latest version automatically
79- echo " Current version: ${CODE_SERVER_CURRENT_VERSION} "
82+ echo -e " $DASH Current version: ${CODE_SERVER_CURRENT_VERSION} "
8083 # The $'\n' adds a line break. See: https://stackoverflow.com/a/39581815/3015595
81- read -r -p " What version of code-server do you want to update to?" $' \n ' CODE_SERVER_VERSION_TO_UPDATE
84+ CODE_SERVER_VERSION_TO_UPDATE=$( git rev-parse --abbrev-ref HEAD | perl -pe ' ($_)=/([0-9]+([.][0-9]+)+)/' )
85+ echo -e " $CHECKMARK Version in branch name"
86+ echo -e " $CHECKMARK Updating to: $CODE_SERVER_VERSION_TO_UPDATE "
8287
83- echo -e " Great! We'll prep a PR for updating to $CODE_SERVER_VERSION_TO_UPDATE \n"
8488 $CMD rg -g ' !yarn.lock' -g ' !*.svg' -g ' !CHANGELOG.md' -g ' !lib/vscode/**' --files-with-matches --fixed-strings " ${CODE_SERVER_CURRENT_VERSION} " | $CMD xargs sd " $CODE_SERVER_CURRENT_VERSION " " $CODE_SERVER_VERSION_TO_UPDATE "
8589
8690 $CMD git commit --no-verify -am " chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE "
You can’t perform that action at this time.
0 commit comments