Skip to content
Permalink
Browse files

Enable pipefail to detect failure of pipeline

  • Loading branch information...
yous committed Oct 7, 2019
1 parent ec77fc2 commit fc5ef4a7b19e7105bf802e40fa9aebb10e1fca66
Showing with 5 additions and 2 deletions.
  1. +1 −0 tools/build_product.sh
  2. +2 −1 tools/install_debug.sh
  3. +2 −1 tools/ready.sh
@@ -1,5 +1,6 @@
#!/bin/bash
#https://discuss.atom.io/t/sandbox-supposedly-enabled-but-application-loader-disagrees/26155
set -o pipefail

if [ ! "${CONFIGURATION}" ]; then
CONFIGURATION='Release'
@@ -1,4 +1,5 @@
#!/bin/bash
set -o pipefail

run_with_echo() {
echo "$@" && eval "$@" || exit $?
@@ -14,7 +15,7 @@ else
PRINTER="cat"
fi

(xcodebuild -workspace 'Gureum.xcworkspace' -scheme 'OSX' -configuration "${CONFIGURATION}" | $PRINTER ) || exit $?
(xcodebuild -workspace 'Gureum.xcworkspace' -scheme 'OSX' -configuration "${CONFIGURATION}" | $PRINTER) || exit $?
if [ ! "${INSTALL_PATH}" ]; then
echo "something wrong" && exit 255
fi
@@ -1,4 +1,5 @@
#!/bin/bash
set -o pipefail

SCRIPT_DIR="$(dirname "$0")"
cd "${SCRIPT_DIR}/.." || exit $?
@@ -16,7 +17,7 @@ fi

echo "Configuration: ${CONFIGURATION}"

xcodebuild -workspace 'Gureum.xcworkspace' -scheme 'ScriptSupport' -configuration "${CONFIGURATION}" | grep export > "${TMPSCRIPT}"
(xcodebuild -workspace 'Gureum.xcworkspace' -scheme 'ScriptSupport' -configuration "${CONFIGURATION}" | grep export > "${TMPSCRIPT}") || exit $?
# shellcheck disable=1090
. "${TMPSCRIPT}" > /dev/null 2>&1
rm "${TMPSCRIPT}"

0 comments on commit fc5ef4a

Please sign in to comment.
You can’t perform that action at this time.