From dd14ba9e0e91e54d7ee442e90a8674eafcaaea62 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 22 Jul 2024 21:33:07 +0300 Subject: [PATCH] build: Increase error strictness --- bin/build-debian.sh | 2 ++ bin/build-docker.sh | 2 ++ bin/build-linux-x64.sh | 2 ++ bin/build-mac-arm64.sh | 2 ++ bin/build-mac-x64.sh | 2 ++ bin/build-server.sh | 2 ++ bin/build-win-x64.sh | 2 ++ bin/build.sh | 3 ++- 8 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/build-debian.sh b/bin/build-debian.sh index d973d2f36..ecf88f359 100755 --- a/bin/build-debian.sh +++ b/bin/build-debian.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e # Fail on any command error + if ! command -v dpkg-deb &> /dev/null; then echo "Missing command: dpkg-deb" exit 1 diff --git a/bin/build-docker.sh b/bin/build-docker.sh index 2b3794677..9d614eb2b 100755 --- a/bin/build-docker.sh +++ b/bin/build-docker.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e # Fail on any command error + VERSION=`jq -r ".version" package.json` SERIES=${VERSION:0:4}-latest diff --git a/bin/build-linux-x64.sh b/bin/build-linux-x64.sh index 7b7b91a8a..86d4f97f7 100755 --- a/bin/build-linux-x64.sh +++ b/bin/build-linux-x64.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e # Fail on any command error + if ! command -v jq &> /dev/null; then echo "Missing command: jq" exit 1 diff --git a/bin/build-mac-arm64.sh b/bin/build-mac-arm64.sh index 219435344..d9736bca0 100755 --- a/bin/build-mac-arm64.sh +++ b/bin/build-mac-arm64.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e # Fail on any command error + SRC_DIR=./dist/trilium-mac-arm64-src if [ "$1" != "DONTCOPY" ] diff --git a/bin/build-mac-x64.sh b/bin/build-mac-x64.sh index ba05322ae..c34fd6ad8 100755 --- a/bin/build-mac-x64.sh +++ b/bin/build-mac-x64.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e # Fail on any command error + SRC_DIR=./dist/trilium-mac-x64-src if [ "$1" != "DONTCOPY" ] diff --git a/bin/build-server.sh b/bin/build-server.sh index 94a3650ef..1be416116 100755 --- a/bin/build-server.sh +++ b/bin/build-server.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e # Fail on any command error + PKG_DIR=dist/trilium-linux-x64-server NODE_VERSION=20.15.1 diff --git a/bin/build-win-x64.sh b/bin/build-win-x64.sh index f71296cd5..f40aaaef9 100755 --- a/bin/build-win-x64.sh +++ b/bin/build-win-x64.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e # Fail on any command error + if ! command -v wine &> /dev/null; then echo "Missing command: wine" exit 1 diff --git a/bin/build.sh b/bin/build.sh index 513bd1129..7fb41cfcb 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -e # Fail on any command error + if ! command -v jq &> /dev/null; then echo "Missing command: jq" exit 1 @@ -40,7 +42,6 @@ cp -r $SRC_DIR ./dist/trilium-windows-x64-src cp -r $SRC_DIR ./dist/trilium-mac-x64-src cp -r $SRC_DIR ./dist/trilium-mac-arm64-src -set -e bin/build-win-x64.sh DONTCOPY bin/build-mac-x64.sh DONTCOPY