rpm/build*.sh: trap failures
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
#set -vx
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Set arguments via environment variables.
|
||||
# Argument can be omitted and defaults will be detected.
|
||||
@@ -115,7 +117,7 @@ COMMIT="${COMMIT:-$(printf '%s' "$COMMIT_FULL" | sed 's/^\(.\{10\}\).*/\1/' || d
|
||||
BCOND_DEFAULT_DEBUG="${BCOND_DEFAULT_DEBUG:-0}"
|
||||
BCOND_DEFAULT_TEST="${BCOND_DEFAULT_TEST:-0}"
|
||||
BCOND_DEFAULT_LTO="${BCOND_DEFAULT_LTO}"
|
||||
USERNAME="${USERNAME:-"$(git config user.name) <$(git config user.email)>"}"
|
||||
USERNAME="${USERNAME:-"$(git config user.name || :) <$(git config user.email || :)>"}"
|
||||
SPECFILE="$(abs_path "$SPECFILE" "$SCRIPTDIR/NetworkManager.spec")" || die "invalid \$SPECFILE argument"
|
||||
SOURCE_FROM_GIT="$(coerce_bool "$SOURCE_FROM_GIT" "")"
|
||||
SOURCE="$(abs_path "$SOURCE")" || die "invalid \$SOURCE argument"
|
||||
@@ -262,7 +264,7 @@ ls -dla \
|
||||
"$TEMP_LATEST"/RPMS/*/*.rpm \
|
||||
"$TEMP_LATEST"/SRPMS/ \
|
||||
"$TEMP_LATEST"/SRPMS/*.rpm \
|
||||
2>/dev/null | sed 's/^/ /'
|
||||
2>/dev/null | sed 's/^/ /' || :
|
||||
LOG
|
||||
if [[ "$BUILDTYPE" == "SRPM" ]]; then
|
||||
LOG sudo $(command -v dnf &>/dev/null && echo dnf builddep || echo yum-builddep) $TEMP_LATEST/SRPMS/*.src.rpm
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
die() {
|
||||
echo "$*" >&2
|
||||
|
Reference in New Issue
Block a user