Skip to content

Commit acde797

Browse files
committed
refactor: update script command to get git branch
1 parent c7b6221 commit acde797

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ci/build/release-prep.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ main() {
9393

9494
$CMD git add . && $CMD git commit -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
9595

96-
CURRENT_BRANCH=$(git branch --show-current)
96+
CURRENT_BRANCH=$(git branch | grep '\*' | cut -d' ' -f2-)
9797
# Note: we need to set upstream as well or the gh pr create step will fail
9898
# See: https://github.com/cli/cli/issues/575
99-
$CMD git push -u origin "$CURRENT_BRANCH"
99+
$CMD git push -u origin "$CURRENT_BRANCH
100100
101101
# This runs from the root so that's why we use this path vs. ../../
102102
RELEASE_TEMPLATE_STRING=$(cat ./.github/PULL_REQUEST_TEMPLATE/release_template.md)

ci/dev/update-vscode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ main() {
8181
# Push branch to remote if not already pushed
8282
# If we don't do this, the opening a draft PR step won't work
8383
# because it will stop and ask where you want to push the branch
84-
CURRENT_BRANCH=$(git branch --show-current)
84+
CURRENT_BRANCH=$(git branch | grep '\*' | cut -d' ' -f2-)
8585
if [[ -z $(git ls-remote --heads origin "$CURRENT_BRANCH") ]]; then
8686
echo "Doesn't look like you've pushed this branch to remote"
8787
echo -e "Pushing now using: git push origin $CURRENT_BRANCH\n"

0 commit comments

Comments
 (0)