Skip to content

Commit 8900f88

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 0d9d4a9 commit 8900f88

11 files changed

+33
-33
lines changed

.github/workflows/test-python-poetry-task.yml

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

workflow-templates/check-go-task.yml

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

workflow-templates/dependabot/workflow-template-copies/.github/workflows/check-go-task.yml

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

workflow-templates/dependabot/workflow-template-copies/.github/workflows/publish-go-tester-task.yml

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

workflow-templates/dependabot/workflow-template-copies/.github/workflows/test-go-integration-task.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444
run: |
4545
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
4646
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
47-
if [[ \
48-
"${{ github.event_name }}" != "create" || \
49-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
47+
if [[
48+
"${{ github.event_name }}" != "create" ||
49+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
5050
]]; then
5151
# Run the other jobs.
5252
RESULT="true"

workflow-templates/dependabot/workflow-template-copies/.github/workflows/test-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"

workflow-templates/dependabot/workflow-template-copies/.github/workflows/test-python-poetry-task.yml

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

workflow-templates/publish-go-tester-task.yml

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

workflow-templates/test-go-integration-task.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444
run: |
4545
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
4646
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
47-
if [[ \
48-
"${{ github.event_name }}" != "create" || \
49-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
47+
if [[
48+
"${{ github.event_name }}" != "create" ||
49+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
5050
]]; then
5151
# Run the other jobs.
5252
RESULT="true"

workflow-templates/test-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"

workflow-templates/test-python-poetry-task.yml

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

0 commit comments

Comments
 (0)