Skip to content

Commit 8d7d647

Browse files
committed
fix(update-aws-cdk): Ensure a valid git branch name
Remove invalid `^` character from branch name as described in the spec - https://git-scm.com/docs/git-check-ref-format. See also #2698.
1 parent 6ed63be commit 8d7d647

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

script/update-aws-cdk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ raisePR() {
5151
AWSCDKLIB_VERSION=$(jq -r '.peerDependencies."aws-cdk-lib"' < "$ROOT_DIR/package.json")
5252
CONSTRUCT_VERSION=$(jq -r '.peerDependencies.constructs' < "$ROOT_DIR/package.json")
5353

54-
BRANCH_NAME="update-aws-cdk-$AWSCDK_VERSION"
54+
BRANCH_NAME=$(
55+
echo "update-aws-cdk-$AWSCDK_VERSION" \
56+
| sed 's/\^//g' # Remove ^ to ensure a valid branch name. See https://git-scm.com/docs/git-check-ref-format.
57+
)
58+
59+
echo $BRANCH_NAME
60+
5561
COMMIT_SUBJECT="fix(deps): Update AWS CDK libraries to $AWSCDK_VERSION, and constructs to $CONSTRUCT_VERSION"
5662
COMMIT_BODY="Update aws-cdk to $AWSCDK_VERSION, aws-cdk-lib to $AWSCDKLIB_VERSION, constructs to $CONSTRUCT_VERSION"
5763

0 commit comments

Comments
 (0)