Skip to content

Commit 2ebd0d7

Browse files
committed
build scripts: use CGO_ENABLED=0 to disable openssl
1 parent 5f324fe commit 2ebd0d7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

build-without-openssl.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
cd "$(dirname "$0")"
44

5-
CGO_ENABLED=0 source ./build.bash -tags without_openssl
5+
CGO_ENABLED=0 source ./build.bash

test-without-openssl.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
cd "$(dirname "$0")"
44

5-
./test.bash -tags without_openssl "$@"
5+
CGO_ENABLED=0 ./test.bash "$@"

test.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ unmount_leftovers || true
5454
echo "$MYNAME: build-without-openssl.bash failed"
5555
exit 1
5656
}
57-
# Don't build with openssl if we were passed "-tags without_openssl"
58-
if [[ "$*" != *without_openssl* ]] ; then
57+
# Only build with openssl if cgo is enabled
58+
if [[ $(go env CGO_ENABLED) -eq 1 ]] ; then
5959
./build.bash
6060
fi
6161

0 commit comments

Comments
 (0)