Skip to content

Commit

Permalink
Add extra release data to produced binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
meeDamian committed Oct 6, 2020
1 parent c426738 commit b36baec
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions 0.11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ RUN env && go version && go env
# NOTE: all of this has to happen in a single `RUN`, because it's impossible to set ENV var in Docker to
# an output of an expression
RUN go build -v -trimpath -mod=readonly -tags="$TAGS" \
-ldflags="$LDFLAGS -X $PKG/build.Commit=$(git describe --abbrev=40)" \
-ldflags="$LDFLAGS \
-X $PKG/build.Commit=$(git describe --abbrev=40) \
-X $PKG/build.CommitHash=$(git rev-parse HEAD) \
-X $PKG/build.GoVersion=$(go version | awk '{print $3}') \
-X $PKG/build.RawTags=$(echo $TAGS | tr ' ' ,)" \
-o /go/bin/ "$PKG/cmd/lnd" "$PKG/cmd/lncli"


Expand Down Expand Up @@ -163,7 +167,11 @@ WORKDIR /go/src/
RUN env && go version && go env

RUN go build -v -trimpath -mod=readonly -tags="$TAGS" \
-ldflags="$LDFLAGS -X $PKG/build.Commit=$(git describe --abbrev=40)" \
-ldflags="$LDFLAGS \
-X $PKG/build.Commit=$(git describe --abbrev=40) \
-X $PKG/build.CommitHash=$(git rev-parse HEAD) \
-X $PKG/build.GoVersion=$(go version | awk '{print $3}') \
-X $PKG/build.RawTags=$(echo $TAGS | tr ' ' ,)" \
-o /go/bin/ "$PKG/cmd/lnd" "$PKG/cmd/lncli"


Expand Down

0 comments on commit b36baec

Please sign in to comment.