aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2025-08-07 22:17:25 +0200
committerJakob Unterwurzacher2025-08-07 22:17:25 +0200
commit2ebd0d754b8ee46e6c65e90e1d1e13491b03b7b5 (patch)
tree04b5127c89b3bafc9dc3272bee4873915d6e3da1
parent5f324fe6614c1cf6bc7e5c07807332c8bb23dd5c (diff)
build scripts: use CGO_ENABLED=0 to disable openssl
-rwxr-xr-xbuild-without-openssl.bash2
-rwxr-xr-xtest-without-openssl.bash2
-rwxr-xr-xtest.bash4
3 files changed, 4 insertions, 4 deletions
diff --git a/build-without-openssl.bash b/build-without-openssl.bash
index e965951..c09e7f3 100755
--- a/build-without-openssl.bash
+++ b/build-without-openssl.bash
@@ -2,4 +2,4 @@
cd "$(dirname "$0")"
-CGO_ENABLED=0 source ./build.bash -tags without_openssl
+CGO_ENABLED=0 source ./build.bash
diff --git a/test-without-openssl.bash b/test-without-openssl.bash
index 3f9de9e..e596753 100755
--- a/test-without-openssl.bash
+++ b/test-without-openssl.bash
@@ -2,4 +2,4 @@
cd "$(dirname "$0")"
-./test.bash -tags without_openssl "$@"
+CGO_ENABLED=0 ./test.bash "$@"
diff --git a/test.bash b/test.bash
index 7e56374..d5da874 100755
--- a/test.bash
+++ b/test.bash
@@ -54,8 +54,8 @@ unmount_leftovers || true
echo "$MYNAME: build-without-openssl.bash failed"
exit 1
}
-# Don't build with openssl if we were passed "-tags without_openssl"
-if [[ "$*" != *without_openssl* ]] ; then
+# Only build with openssl if cgo is enabled
+if [[ $(go env CGO_ENABLED) -eq 1 ]] ; then
./build.bash
fi