-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65521a3
commit 4a7bb29
Showing
5 changed files
with
19 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
**/.git | ||
databunker.db* | ||
databunker | ||
Dockerfile | ||
./data | ||
.* | ||
*.md | ||
.env | ||
data/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,13 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
set -x | ||
|
||
VERSION=$(cat ./version.txt) | ||
|
||
if [[ ! -x "~/go/bin/packr" && ! -x "packr" ]]; then | ||
go install github.com/gobuffalo/packr/packr@latest | ||
fi | ||
HASH=$(git rev-parse --short=12 HEAD) | ||
TIMESTAMP=$(date +%Y%m%d%H%M%S) # Current timestamp | ||
FULL_VERSION=$VERSION-$TIMESTAMP-$HASH | ||
|
||
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 | ||
|
||
go build -v -ldflags="-s -w -X main.version=$FULL_VERSION" -o ../databunker | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/sh | ||
|
||
VERSION=$(cat ./version.txt) | ||
docker build -t securitybunker/databunker:$VERSION --build-arg VERSION=$VERSION . | ||
docker build -t securitybunker/databunker:$VERSION . | ||
docker tag securitybunker/databunker:$VERSION securitybunker/databunker:latest | ||
docker-compose -f docker-compose-pgsql.yml down || true | ||
docker-compose -f docker-compose-pgsql.yml up -d |