From 2a372c5b23cf6752d418e9f9aa5adece64cdac7e Mon Sep 17 00:00:00 2001 From: per1234 Date: Tue, 15 Oct 2024 07:07:00 -0700 Subject: [PATCH] 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 --- .github/workflows/check-go-task.yml | 6 +++--- .github/workflows/test-go-integration-task.yml | 6 +++--- .github/workflows/test-go-task.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check-go-task.yml b/.github/workflows/check-go-task.yml index 02615f3e..f47fd3ed 100644 --- a/.github/workflows/check-go-task.yml +++ b/.github/workflows/check-go-task.yml @@ -40,9 +40,9 @@ jobs: run: | RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead. - if [[ \ - "${{ github.event_name }}" != "create" || \ - "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \ + if [[ + "${{ github.event_name }}" != "create" || + "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ]]; then # Run the other jobs. RESULT="true" diff --git a/.github/workflows/test-go-integration-task.yml b/.github/workflows/test-go-integration-task.yml index 7f86a8de..e00e5f6e 100644 --- a/.github/workflows/test-go-integration-task.yml +++ b/.github/workflows/test-go-integration-task.yml @@ -48,9 +48,9 @@ jobs: run: | RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead. - if [[ \ - "${{ github.event_name }}" != "create" || \ - "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \ + if [[ + "${{ github.event_name }}" != "create" || + "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ]]; then # Run the other jobs. RESULT="true" diff --git a/.github/workflows/test-go-task.yml b/.github/workflows/test-go-task.yml index f5839d66..41640b85 100644 --- a/.github/workflows/test-go-task.yml +++ b/.github/workflows/test-go-task.yml @@ -48,9 +48,9 @@ jobs: run: | RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead. - if [[ \ - "${{ github.event_name }}" != "create" || \ - "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \ + if [[ + "${{ github.event_name }}" != "create" || + "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ]]; then # Run the other jobs. RESULT="true"