mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-10-29 09:02:22 +00:00
28 lines
449 B
Bash
Executable File
28 lines
449 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -x
|
|
|
|
VERSION=$(cat ./version.txt)
|
|
|
|
if [[ ! -x "~/go/bin/packr" && ! -x "packr" ]]; then
|
|
go install github.com/gobuffalo/packr/packr@latest
|
|
fi
|
|
|
|
cd src
|
|
go get -d -v
|
|
if [ -x "~/go/bin/packr" ]; then
|
|
~/go/bin/packr
|
|
elif [ -x "packr" ]; then
|
|
packr
|
|
fi
|
|
|
|
go build -v -ldflags="-s -w -X main.version=${VERSION}" -o ../databunker
|
|
|
|
if [ -x "~/go/bin/packr" ]; then
|
|
~/go/bin/packr clean
|
|
elif [ -x "packr" ]; then
|
|
packr clean
|
|
fi
|
|
|
|
cd ..
|