Skip to content

Commit 2a372c5

Browse files
committed
Remove unnecessary line continuation escaping from workflows
It is often necessary to escape the newline for continuation when breaking shell commands into multiple lines for readability. However, if a line break occurs in a shell command in an unterminated command, the continuation is implicit. The escaping in these shell commands was unnecessary and only made them a bit more cryptic, since the brackets already clearly indicate the structure
1 parent 860e1a5 commit 2a372c5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/workflows/check-go-task.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
run: |
4141
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
4242
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
43-
if [[ \
44-
"${{ github.event_name }}" != "create" || \
45-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
43+
if [[
44+
"${{ github.event_name }}" != "create" ||
45+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
4646
]]; then
4747
# Run the other jobs.
4848
RESULT="true"

.github/workflows/test-go-integration-task.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ jobs:
4848
run: |
4949
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
5050
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
51-
if [[ \
52-
"${{ github.event_name }}" != "create" || \
53-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
51+
if [[
52+
"${{ github.event_name }}" != "create" ||
53+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
5454
]]; then
5555
# Run the other jobs.
5656
RESULT="true"

.github/workflows/test-go-task.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ jobs:
4848
run: |
4949
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
5050
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
51-
if [[ \
52-
"${{ github.event_name }}" != "create" || \
53-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
51+
if [[
52+
"${{ github.event_name }}" != "create" ||
53+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
5454
]]; then
5555
# Run the other jobs.
5656
RESULT="true"

0 commit comments

Comments
 (0)