mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-10-29 17:12:22 +00:00
revert some changes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# STEP 1 build executable file
|
||||
##############################
|
||||
FROM golang:alpine AS builder
|
||||
RUN apk update && apk add --no-cache git gcc libc-dev openssl
|
||||
RUN apk update && apk add --no-cache git gcc libc-dev openssl && go install github.com/gobuffalo/packr/packr@latest
|
||||
WORKDIR /go/src/securitybunker/databunker/src/
|
||||
COPY src/go.mod ./deps
|
||||
RUN cat ./deps | grep -v storage > ./go.mod && go mod download
|
||||
|
||||
22
build.sh
22
build.sh
@@ -7,7 +7,29 @@ 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
|
||||
echo "Found ~/go/bin/packr"
|
||||
elif [ -x "packr" ]; then
|
||||
echo "Fond packr"
|
||||
else
|
||||
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=$FULL_VERSION" -o ../databunker
|
||||
|
||||
if [ -x "~/go/bin/packr" ]; then
|
||||
~/go/bin/packr clean
|
||||
elif [ -x "packr" ]; then
|
||||
packr clean
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user