mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:24 +00:00
Use double quotes consistently for shell scripts (#14938)
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
## Summary
The release failed
(3432150963
)
because the shell script in the Docker release workflow was using single
quotes instead of double quotes.
This is related to https://www.shellcheck.net/wiki/SC2016. I found it
via [`actionlint`](https://github.com/rhysd/actionlint). Related #14893.
I also went ahead and fixed https://www.shellcheck.net/wiki/SC2086 which
were raised in a couple of places.
This commit is contained in:
parent
37f433814c
commit
3629cbf35a
2 changed files with 9 additions and 9 deletions
14
.github/workflows/build-docker.yml
vendored
14
.github/workflows/build-docker.yml
vendored
|
@ -72,7 +72,7 @@ jobs:
|
||||||
- name: Normalize Platform Pair (replace / with -)
|
- name: Normalize Platform Pair (replace / with -)
|
||||||
run: |
|
run: |
|
||||||
platform=${{ matrix.platform }}
|
platform=${{ matrix.platform }}
|
||||||
echo "PLATFORM_TUPLE=${platform//\//-}" >> $GITHUB_ENV
|
echo "PLATFORM_TUPLE=${platform//\//-}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
# Adapted from https://docs.docker.com/build/ci/github-actions/multi-platform/
|
# Adapted from https://docs.docker.com/build/ci/github-actions/multi-platform/
|
||||||
- name: Build and push by digest
|
- name: Build and push by digest
|
||||||
|
@ -143,8 +143,8 @@ jobs:
|
||||||
# The final command becomes `docker buildx imagetools create -t tag1 -t tag2 ... <RUFF_BASE_IMG>@sha256:<sha256_1> <RUFF_BASE_IMG>@sha256:<sha256_2> ...`
|
# The final command becomes `docker buildx imagetools create -t tag1 -t tag2 ... <RUFF_BASE_IMG>@sha256:<sha256_1> <RUFF_BASE_IMG>@sha256:<sha256_2> ...`
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
"$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON")" \
|
||||||
$(printf '${RUFF_BASE_IMG}@sha256:%s ' *)
|
"$(printf "${RUFF_BASE_IMG}@sha256:%s " *)"
|
||||||
|
|
||||||
docker-publish-extra:
|
docker-publish-extra:
|
||||||
name: Publish additional Docker image based on ${{ matrix.image-mapping }}
|
name: Publish additional Docker image based on ${{ matrix.image-mapping }}
|
||||||
|
@ -203,14 +203,14 @@ jobs:
|
||||||
TAG_PATTERNS="${TAG_PATTERNS%\\n}"
|
TAG_PATTERNS="${TAG_PATTERNS%\\n}"
|
||||||
|
|
||||||
# Export image cache name
|
# Export image cache name
|
||||||
echo "IMAGE_REF=${BASE_IMAGE//:/-}" >> $GITHUB_ENV
|
echo "IMAGE_REF=${BASE_IMAGE//:/-}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
# Export tag patterns using the multiline env var syntax
|
# Export tag patterns using the multiline env var syntax
|
||||||
{
|
{
|
||||||
echo "TAG_PATTERNS<<EOF"
|
echo "TAG_PATTERNS<<EOF"
|
||||||
echo -e "${TAG_PATTERNS}"
|
echo -e "${TAG_PATTERNS}"
|
||||||
echo EOF
|
echo EOF
|
||||||
} >> $GITHUB_ENV
|
} >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
|
@ -288,5 +288,5 @@ jobs:
|
||||||
readarray -t lines <<< "$DOCKER_METADATA_OUTPUT_ANNOTATIONS"; annotations=(); for line in "${lines[@]}"; do annotations+=(--annotation "$line"); done
|
readarray -t lines <<< "$DOCKER_METADATA_OUTPUT_ANNOTATIONS"; annotations=(); for line in "${lines[@]}"; do annotations+=(--annotation "$line"); done
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
"${annotations[@]}" \
|
"${annotations[@]}" \
|
||||||
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
"$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON")" \
|
||||||
$(printf '${RUFF_BASE_IMG}@sha256:%s ' *)
|
"$(printf "${RUFF_BASE_IMG}@sha256:%s " *)"
|
||||||
|
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -268,9 +268,9 @@ jobs:
|
||||||
RELEASE_COMMIT: "${{ github.sha }}"
|
RELEASE_COMMIT: "${{ github.sha }}"
|
||||||
run: |
|
run: |
|
||||||
# Write and read notes from a file to avoid quoting breaking things
|
# Write and read notes from a file to avoid quoting breaking things
|
||||||
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
|
echo "$ANNOUNCEMENT_BODY" > "$RUNNER_TEMP/notes.txt"
|
||||||
|
|
||||||
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
|
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" "$PRERELEASE_FLAG" --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
|
||||||
|
|
||||||
custom-notify-dependents:
|
custom-notify-dependents:
|
||||||
needs:
|
needs:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue