mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-10-30 01:22:28 +00:00
fix script
This commit is contained in:
11
build.sh
11
build.sh
@@ -1,24 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
#!/bin/bash
|
||||
|
||||
VERSION=$(cat ./version.txt)
|
||||
HASH=$(git rev-parse --short=12 HEAD)
|
||||
TIMESTAMP=$(date +%Y%m%d%H%M%S) # Current timestamp
|
||||
FULL_VERSION=$VERSION-$TIMESTAMP-$HASH
|
||||
|
||||
if [ -x "~/go/bin/packr" ]; then
|
||||
if [ -x ~/go/bin/packr ]; then
|
||||
echo "Found ~/go/bin/packr"
|
||||
elif [ -x "packr" ]; then
|
||||
echo "Fond packr"
|
||||
else
|
||||
echo "installing packr"
|
||||
go install github.com/gobuffalo/packr/packr@latest
|
||||
fi
|
||||
|
||||
cd src
|
||||
go get -d -v
|
||||
|
||||
if [ -x "~/go/bin/packr" ]; then
|
||||
if [ -x ~/go/bin/packr ]; then
|
||||
~/go/bin/packr
|
||||
else
|
||||
packr
|
||||
@@ -26,7 +25,7 @@ fi
|
||||
|
||||
CGO_ENABLED=0 go build -v -ldflags="-s -w -X main.version=$FULL_VERSION" -o ../databunker
|
||||
|
||||
if [ -x "~/go/bin/packr" ]; then
|
||||
if [ -x ~/go/bin/packr ]; then
|
||||
~/go/bin/packr clean
|
||||
else
|
||||
packr clean
|
||||
|
||||
Reference in New Issue
Block a user