mirror of
https://github.com/flant/ovpn-admin.git
synced 2024-12-12 08:44:07 +02:00
19 lines
537 B
Bash
Executable File
19 lines
537 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
PATH=$PATH:~/go/bin
|
|
|
|
cd frontend && npm install && npm run build && cd ..
|
|
|
|
packr2
|
|
|
|
if [[ "$GOOS" == "linux" ]]; then
|
|
if [[ "$GOARCH" == "arm" ]]; then
|
|
CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm go build -a -tags netgo -ldflags "-linkmode external -extldflags -static -s -w" $@
|
|
fi
|
|
if [[ "$GOARCH" == "arm64" ]]; then
|
|
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -a -tags netgo -ldflags "-linkmode external -extldflags -static -s -w" $@
|
|
fi
|
|
fi
|
|
|
|
packr2 clean
|