Skip to content

Commit

Permalink
change: default target make just does go build, add make snapshot
Browse files Browse the repository at this point in the history
- this way the default target does not need `goreleaser`
  • Loading branch information
agilgur5 committed Aug 28, 2022
1 parent a78ee48 commit ae7431b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -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
Expand All @@ -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
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ae7431b

Please sign in to comment.