atomone-hub / govgen

GovGen chain software
Apache License 2.0
8 stars 5 forks source link

feat(chore): align Makefile and goreleaser #34

Closed tbruyelle closed 6 months ago

tbruyelle commented 6 months ago

So make build, make install and goreleaser build produce the exact same binary.

The fix consists mainly of tuning the ldflags of the Makefile and of the .goreleaser file:

A couple of other tiny things had to be updated:

Quick demo:

$ make build install   # produce build/govgend and $GOBIN/govgend

$ goreleaser build --single-target --clean --snapshot   # produce dist/govgend_linux_amd64_v1/govgend

$  sha256sum $GOBIN/govgend build/govgend dist/govgend_linux_amd64_v1/govgend
77c3249d8b6ae81b4bf9d0d1b683ba7658a63db2fff517c50837e91e73e248da  /home/tom/go/bin/govgend
77c3249d8b6ae81b4bf9d0d1b683ba7658a63db2fff517c50837e91e73e248da  build/govgend
77c3249d8b6ae81b4bf9d0d1b683ba7658a63db2fff517c50837e91e73e248da  dist/govgend_linux_amd64_v1/govgend
kristovatlas commented 6 months ago

Didn't test this but code looks solid.