Skip to content

Commit

Permalink
fixing build flags (#425)
Browse files Browse the repository at this point in the history
Co-authored-by: Will <will@cypherpunk.email>
  • Loading branch information
nikkolasg and willscott committed May 26, 2020
1 parent 06ed8a6 commit 3491e11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Expand Up @@ -32,11 +32,9 @@ RUN \
go install \
-mod=readonly \
-ldflags \
"-X main.version=${version} \
-X main.buildDate=`date -u +%d/%m/%Y@%H:%M:%S` \
-X main.gitCommit=${gitCommit}"


"-X github.com/drand/drand/cmd/drand-cli.version=${version} \
-X github.com/drand/drand/cmd/drand-cli.buildDate=`date -u +%d/%m/%Y@%H:%M:%S` \
-X github.com/drand/drand/cmd/drand-cli.gitCommit=${gitCommit}"

FROM busybox:1-glibc
MAINTAINER Hector Sanjuan <hector@protocol.ai>
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -28,8 +28,8 @@ demo:

# create the "drand" binary and install it in $GOBIN
install:
GO111MODULE=on go install -ldflags "-X main.version=`git describe --tags` -X main.buildDate=`date -u +%d/%m/%Y@%H:%M:%S` -X main.gitCommit=`git rev-parse HEAD`"
go install -ldflags "-X github.com/drand/drand/cmd/drand-cli.version=`git describe --tags` -X github.com/drand/drand/cmd/drand-cli.buildDate=`date -u +%d/%m/%Y@%H:%M:%S` -X github.com/drand/drand/cmd/drand-cli.gitCommit=`git rev-parse HEAD`"

# create the "drand" binary in the current folder
build:
go build -ldflags "-X main.version=`git describe --tags` -X main.buildDate=`date -u +%d/%m/%Y@%H:%M:%S` -X main.gitCommit=`git rev-parse HEAD`"
go build -ldflags "-X github.com/drand/drand/cmd/drand-cli.version=`git describe --tags` -X github.com/drand/drand/cmd/drand-cli.buildDate=`date -u +%d/%m/%Y@%H:%M:%S` -X github.com/drand/drand/cmd/drand-cli.gitCommit=`git rev-parse HEAD`"

0 comments on commit 3491e11

Please sign in to comment.