Skip to content

Commit

Permalink
Build: Remove packr files from build
Browse files Browse the repository at this point in the history
  • Loading branch information
qraimbault committed Aug 1, 2020
1 parent e971753 commit b2cbf12
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,6 @@ cerberus
cerberus.toml
cerberus2.toml
config.toml

*-packr.go
packrd
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
build: main.go
GO111MODULE=on go build -ldflags="-s -w -X github.com/forsam-education/cerberus/utils.VersionHash=`git rev-parse HEAD` -X github.com/forsam-education/cerberus/utils.BuildTime=`date +%Y-%m-%dT%T%z` -X github.com/forsam-education/cerberus/utils.VersionIdentifier=`git describe --tags`" -o bin/cerberus .
packr2 && GO111MODULE=on go build -ldflags="-s -w -X github.com/forsam-education/cerberus/utils.VersionHash=`git rev-parse HEAD` -X github.com/forsam-education/cerberus/utils.BuildTime=`date +%Y-%m-%dT%T%z` -X github.com/forsam-education/cerberus/utils.VersionIdentifier=`git describe --tags`" -o bin/cerberus .
4 changes: 4 additions & 0 deletions build/package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ WORKDIR /go/src/cerberus
ARG version_hash

ADD . /go/src/cerberus

RUN go get -u github.com/gobuffalo/packr/v2/packr2

RUN packr2
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 'github.com/forsam-education/cerberus/utils.VersionHash=${version_hash}' -X 'github.com/forsam-education/cerberus/utils.BuildTime=`date +%Y-%m-%dT%T%z`'" -o bin/cerberus

FROM scratch
Expand Down
8 changes: 0 additions & 8 deletions database/database-packr.go

This file was deleted.

29 changes: 0 additions & 29 deletions packrd/packed-packr.go

This file was deleted.

0 comments on commit b2cbf12

Please sign in to comment.