mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 12:14:21 +01:00
27 lines
341 B
Bash
Executable File
27 lines
341 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
PARENT_PATH=$(dirname $(
|
|
cd $(dirname $0)
|
|
pwd -P
|
|
))
|
|
|
|
if [[ -z $GOOS ]]; then
|
|
GOOS=$(eval "go env GOOS")
|
|
fi
|
|
|
|
if [[ -z $GOARCH ]]; then
|
|
GOARCH=$(eval "go env GOARCH")
|
|
fi
|
|
|
|
echo "Building for $GOOS $GOARCH"
|
|
|
|
pushd $PARENT_PATH
|
|
mkdir -p build
|
|
|
|
|
|
GO111MODULE=on go build -ldflags="-s -w" -o build/ark-$GOOS-$GOARCH .
|
|
|
|
popd
|