mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
docker build fix
This commit is contained in:
parent
4f412a2b6d
commit
a4284cf854
1 changed files with 14 additions and 8 deletions
16
build
16
build
|
@ -28,14 +28,20 @@ if [ -z $TABLES ] && [ -z $DEBUG ]; then
|
|||
LDFLAGS="$LDFLAGS -s -w"
|
||||
fi
|
||||
|
||||
LIBNAME="yggdrasillib"
|
||||
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
if [[ "$CGO_ENABLED" == "1" ]]; then
|
||||
LIBNAME="yggdrasillib"
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
LIBNAME="$LIBNAME.so"
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
echo "Building: $LIBNAME"
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
LIBNAME="$LIBNAME.dylib"
|
||||
elif [[ "$OSTYPE" == "win32" ]]; then
|
||||
echo "Building: $LIBNAME"
|
||||
elif [[ "$OSTYPE" == "win32" ]]; then
|
||||
LIBNAME="$LIBNAME.dll"
|
||||
echo "Building: $LIBNAME"
|
||||
fi
|
||||
go build -ldflags="$LDFLAGS" -buildmode=c-shared -o="$LIBNAME" ./cmd/yggdrasillib
|
||||
fi
|
||||
|
||||
for CMD in yggdrasil yggdrasilctl; do
|
||||
|
@ -48,4 +54,4 @@ for CMD in yggdrasil yggdrasilctl; do
|
|||
fi
|
||||
done
|
||||
|
||||
go build -ldflags="$LDFLAGS" -buildmode=c-shared -o="$LIBNAME" ./cmd/yggdrasillib
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue