From ae7431ba25986a6c65cd337fcb77320a5c86c45c Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sun, 28 Aug 2022 12:37:16 -0400 Subject: [PATCH] change: default target `make` just does `go build`, add `make snapshot` - this way the default target does not need `goreleaser` --- Makefile | 7 +++++-- README.md | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c6030b3..58309a7 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ GOVERSION := $$(go version) # keep docopts: as first target for development docopts: docopts.go Makefile - GOVERSION=$(GOVERSION) goreleaser build --rm-dist --snapshot --single-target -o $@ + go build -o $@ install_builddep: go mod tidy @@ -35,5 +35,8 @@ README.md: examples/legacy_bash/rock_hello_world.sh examples/legacy_bash/rock_he clean: rm -f docopts-* docopts README.tmp dist/* -release: clean all test +snapshot: install_builddep + GOVERSION=$(GOVERSION) goreleaser build --rm-dist --snapshot --single-target -o docopts + +release: clean all test snapshot GOVERSION=$(GOVERSION) goreleaser release diff --git a/README.md b/README.md index d656843..07aebdf 100644 --- a/README.md +++ b/README.md @@ -374,6 +374,7 @@ you have Go installed. Or find a local golang developer that you trust and ask her, in exchange for a beer or two, if she could build it for you. ;) local build: +(also done with our Makefile default target: `make`) ``` go build docopts.go @@ -385,7 +386,7 @@ cross compile for 32 bit: env GOOS=linux GOARCH=386 go build docopts.go ``` -or via Makefile (note that this installs extra, development only dependencies): +or via Makefile: ``` make all