Skip to content

Commit 343f19c

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 01208b8 commit 343f19c

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

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

Lines changed: 3 additions & 3 deletions
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/publish-go-tester-task.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
run: |
3838
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
3939
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
40-
if [[ \
41-
"${{ github.event_name }}" != "create" || \
42-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
40+
if [[
41+
("${{ github.event_name }}" != "create" ||
42+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX)
4343
]]; then
4444
# Run the other jobs.
4545
RESULT="true"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ jobs:
5252
run: |
5353
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
5454
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
55-
if [[ \
56-
"${{ github.event_name }}" != "create" || \
57-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
55+
if [[
56+
"${{ github.event_name }}" != "create" ||
57+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
5858
]]; then
5959
# Run the other jobs.
6060
RESULT="true"

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

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

0 commit comments

Comments
 (0)