Merge rust-bitcoin/rust-bitcoin#2635: Add set -euo pipefail
3fa3d37c21
Add set -euo pipefail (Tobin C. Harding) Pull request description: Add `euo pipefail` to all non-trial shell scripts, note if `x` is already set we maintain it. ACKs for top commit: sanket1729: utACK3fa3d37c21
apoelstra: ACK3fa3d37c21
Tree-SHA512: 24c0da96bea44ea4f550847c8f73bbe1d9ccd1bfee1714ef8a0c23075e3a6d438b6006e351cce0df7a1cb0b9d1b50096270f65a62d0def05c84c9573ffefacba
This commit is contained in:
commit
133531fab7
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
# Generates the label configuration using crates in the repository.
|
# Generates the label configuration using crates in the repository.
|
||||||
# The label configuration is appended to the labeler config file.
|
# The label configuration is appended to the labeler config file.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Check that we can publish crates in their current form if there are changes on top of the tip of
|
# Check that we can publish crates in their current form if there are changes on top of the tip of
|
||||||
# master that imply that we are about to do a release.
|
# master that imply that we are about to do a release.
|
||||||
|
|
||||||
set -ex
|
set -euox pipefail
|
||||||
|
|
||||||
main () {
|
main () {
|
||||||
for crate in "internals" "hashes" "bitcoin"; do
|
for crate in "internals" "hashes" "bitcoin"; do
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
set -ex
|
set -euox pipefail
|
||||||
|
|
||||||
# Make all cargo invocations verbose.
|
# Make all cargo invocations verbose.
|
||||||
export CARGO_TERM_VERBOSE=true
|
export CARGO_TERM_VERBOSE=true
|
||||||
|
@ -165,6 +165,10 @@ do_lint() {
|
||||||
# We should not have any duplicate dependencies. This catches mistakes made upgrading dependencies
|
# We should not have any duplicate dependencies. This catches mistakes made upgrading dependencies
|
||||||
# in one crate and not in another (e.g. upgrade bitcoin_hashes in bitcoin but not in secp).
|
# in one crate and not in another (e.g. upgrade bitcoin_hashes in bitcoin but not in secp).
|
||||||
do_dup_deps() {
|
do_dup_deps() {
|
||||||
|
# We can't use pipefail because these grep statements fail by design when there is no duplicate,
|
||||||
|
# the shell therefore won't pick up mistakes in your pipe - you are on your own.
|
||||||
|
set +o pipefail
|
||||||
|
|
||||||
duplicate_dependencies=$(
|
duplicate_dependencies=$(
|
||||||
# Only show the actual duplicated deps, not their reverse tree, then
|
# Only show the actual duplicated deps, not their reverse tree, then
|
||||||
# whitelist the 'syn' crate which is duplicated but it's not our fault.
|
# whitelist the 'syn' crate which is duplicated but it's not our fault.
|
||||||
|
@ -182,6 +186,8 @@ do_dup_deps() {
|
||||||
cargo tree --target=all --all-features --duplicates
|
cargo tree --target=all --all-features --duplicates
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build the docs with a nightly toolchain, in unison with the function
|
# Build the docs with a nightly toolchain, in unison with the function
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
#
|
#
|
||||||
# For hfuzz options see https://github.com/google/honggfuzz/blob/master/docs/USAGE.md
|
# For hfuzz options see https://github.com/google/honggfuzz/blob/master/docs/USAGE.md
|
||||||
|
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
REPO_DIR=$(git rev-parse --show-toplevel)
|
REPO_DIR=$(git rev-parse --show-toplevel)
|
||||||
# shellcheck source=./fuzz-util.sh
|
# shellcheck source=./fuzz-util.sh
|
||||||
source "$REPO_DIR/fuzz/fuzz-util.sh"
|
source "$REPO_DIR/fuzz/fuzz-util.sh"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -euox pipefail
|
||||||
|
|
||||||
REPO_DIR=$(git rev-parse --show-toplevel)
|
REPO_DIR=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
REPO_DIR=$(git rev-parse --show-toplevel)
|
REPO_DIR=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue