From 616a5483e80dc7b3fca3b6f649bf25faba48f021 Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Fri, 20 Sep 2024 12:06:00 +0200 Subject: [PATCH] chore: add build-ledger Makefile target --- CHANGELOG.md | 6 +++++- Makefile | 4 ++++ README.md | 7 +++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aacbb4..bb0e4c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,11 @@ ### BUG FIXES -* Revert fix duplicate amino path in gov module ([#48](https://github.com/atomone-hub/govgen/pull/48)) +* Revert fix duplicate amino path in gov module ([#51](https://github.com/atomone-hub/govgen/pull/51)) + +### FEATURES + +* Add `build-ledger` Makefile target ([#52](https://github.com/atomone-hub/govgen/pull/52)) ## v1.0.3 diff --git a/Makefile b/Makefile index 84bc838..ef65d96 100644 --- a/Makefile +++ b/Makefile @@ -107,6 +107,10 @@ all: install lint run-tests vulncheck BUILD_TARGETS := build install +build-ledger: check_version go.sum $(BUILDDIR)/ + @echo "WARNING: Ledger build involves enabling cgo, which disables the ability to have reproducible builds." + CGO_ENABLED=1 go build -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) -o $(BUILDDIR)/ ./... + build: BUILD_ARGS=-o $(BUILDDIR)/ $(BUILD_TARGETS): check_version go.sum $(BUILDDIR)/ diff --git a/README.md b/README.md index 7320305..665b416 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,10 @@ locally as the Github Release section. To do this, checkout to the expected version and then simply run `make build` (which will output the binary to the `build` directory) or `make install`. The resulted binary should have the same sha256 hash than the one from the Github Release section. + +## Ledger support + +Run `make build-ledger` to have ledger support in `./build/govgend` binary. +Note that this will disable reproducible builds, as it introduces OS +dependencies. +