Skip to content

Commit

Permalink
Merge pull request #220 from stepchowfun/set-x
Browse files Browse the repository at this point in the history
Use `set -x` for shell scripts
  • Loading branch information
stepchowfun authored Mar 13, 2024
2 parents ad41989 + cb61064 commit 5a555b6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
read_remote_cache: true
write_remote_cache: ${{ github.event_name == 'push' }}
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/tagref-x86_64-unknown-linux-gnu artifacts/tagref
Expand All @@ -36,8 +36,8 @@ jobs:
path: artifacts/tagref
if-no-files-found: error
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/tagref-x86_64-unknown-linux-musl artifacts/tagref
Expand All @@ -47,8 +47,8 @@ jobs:
path: artifacts/tagref
if-no-files-found: error
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/tagref-aarch64-unknown-linux-gnu artifacts/tagref
Expand All @@ -58,8 +58,8 @@ jobs:
path: artifacts/tagref
if-no-files-found: error
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/tagref-aarch64-unknown-linux-musl artifacts/tagref
Expand All @@ -74,8 +74,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.76.0 # [ref:rust_1.76.0]
Expand Down Expand Up @@ -114,8 +114,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.76.0 # [ref:rust_1.76.0]
Expand Down Expand Up @@ -152,8 +152,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# Run the installer script.
PREFIX=/tmp ./install.sh
Expand All @@ -166,8 +166,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# Run the installer script.
PREFIX=/tmp ./install.sh
Expand All @@ -187,8 +187,8 @@ jobs:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.76.0 # [ref:rust_1.76.0]
Expand Down
4 changes: 2 additions & 2 deletions toast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ image: ubuntu:22.04
default: build
user: user
command_prefix: |
# Make Bash not silently ignore errors.
set -euo pipefail
# Make Bash log commands and not silently ignore errors.
set -euxo pipefail
# Load the Rust startup file, if it exists.
if [ -f "$HOME/.cargo/env" ]; then
Expand Down

0 comments on commit 5a555b6

Please sign in to comment.