From 5e35338d58b589939b599c98ec9e6b44f94de20a Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 8 Nov 2021 17:38:55 +0300 Subject: Generate stringer files automatically (#841) Added `stringer` annotations to `git.go` for `ErrorClass` and `ErrorCode`. Added `generate` rule for `Makefile` to generate string representations for these types (first building cgo files in `_obj` dir to get C constants). Finally, updated `ci` actions workflow to check that generated files are up to date. Fixes: #543 --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 84262f4..71c5ee0 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ TEST_ARGS ?= --count=1 default: test + +generate: static-build/install/lib/libgit2.a + go generate --tags "static" ./... + # System library # ============== # This uses whatever version of libgit2 can be found in the system. -- cgit v1.2.3