From ec7bca19917e7bf1ce8e8811758361bcea8a63c8 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 7 Nov 2019 22:21:00 +0900 Subject: [PATCH] Make sure that if build.sh fail, it returns --- btcpay-update.sh | 3 ++- build.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/btcpay-update.sh b/btcpay-update.sh index 9eec609..40b8634 100755 --- a/btcpay-update.sh +++ b/btcpay-update.sh @@ -38,8 +38,9 @@ if ! [ -f "/etc/docker/daemon.json" ] && [ -w "/etc/docker" ]; then }" > /etc/docker/daemon.json echo "Setting limited log files in /etc/docker/daemon.json" fi - +set -e . ./build.sh +set +e if [ "$BTCPAYGEN_OLD_PREGEN" == "true" ]; then cp Generated/docker-compose.generated.yml $BTCPAY_DOCKER_COMPOSE cp Generated/torrc.tmpl "$(dirname "$BTCPAY_DOCKER_COMPOSE")/torrc.tmpl" diff --git a/build.sh b/build.sh index 2bcfd35..419c81a 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,7 @@ docker run -v "$(pwd)/Generated:/app/Generated" \ -e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" \ -e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" \ -e "BTCPAY_HOST_SSHAUTHORIZEDKEYS=$BTCPAY_HOST_SSHAUTHORIZEDKEYS" \ - --rm $BTCPAYGEN_DOCKER_IMAGE || echo "Building the fragment failed" + --rm $BTCPAYGEN_DOCKER_IMAGE if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then cp Production/nginx.tmpl Generated/nginx.tmpl