Skip to content

Build your personal knowledge base with Trilium Notes

build: Increase error strictness

Elian Dorandd14ba9e0e91
diff --git a/bin/build-debian.sh b/bin/build-debian.sh
index d973d2f365..ecf88f3592 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 2b37946777..9d614eb2b8 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 7b7b91a8ad..86d4f97f7a 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 2194353448..d9736bca0a 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 ba05322ae6..c34fd6ad88 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 94a3650ef6..1be4161163 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 f71296cd52..f40aaaef93 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 513bd11292..7fb41cfcb5 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