mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
bytecode_reports_for_modified_binaries.sh: Add a helper for exiting with an error message
This commit is contained in:
parent
bb49bc5892
commit
d4e95a76e4
@ -50,7 +50,14 @@
|
|||||||
# FIXME: Can't use set -u because the old Bash on macOS treats empty arrays as unbound variables
|
# FIXME: Can't use set -u because the old Bash on macOS treats empty arrays as unbound variables
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
(( $# == 5 )) || { echo "ERROR: Not enough arguments."; exit 1; }
|
die()
|
||||||
|
{
|
||||||
|
# shellcheck disable=SC2059
|
||||||
|
>&2 printf "ERROR: $1\n" "${@:2}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $# == 5 )) || die "ERROR: Not enough arguments."
|
||||||
|
|
||||||
platform="$1"
|
platform="$1"
|
||||||
base_ref="$2"
|
base_ref="$2"
|
||||||
@ -85,7 +92,7 @@ echo "$modified_release_versions"
|
|||||||
# NOTE: We want perform the check when the soljson-* files in bin/ and wasm/ are modified too
|
# NOTE: We want perform the check when the soljson-* files in bin/ and wasm/ are modified too
|
||||||
# because in that case the symlinks in emscripten-wasm32/ and emscripten-asmjs/ might remain
|
# because in that case the symlinks in emscripten-wasm32/ and emscripten-asmjs/ might remain
|
||||||
# unchanged but were're assuming that these directories are never directly used as a platform name.
|
# unchanged but were're assuming that these directories are never directly used as a platform name.
|
||||||
[[ $platform != bin && $platform != wasm ]] || { echo "Invalid platform name."; exit 1; }
|
[[ $platform != bin && $platform != wasm ]] || die "Invalid platform name."
|
||||||
|
|
||||||
platform_binaries="$(git ls-files "solc-${platform}-v*+commit.*" | sort -V)"
|
platform_binaries="$(git ls-files "solc-${platform}-v*+commit.*" | sort -V)"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user