Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate mocks before building #499

Merged
merged 2 commits into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ been tested for a while.

You can find Linux and macOS binaries on the
[releases page](https://github.com/rebuy-de/aws-nuke/releases), but we also
provide containerized versions on [quay.io/rebuy/aws-nuke](quay.io/rebuy/aws-nuke)
provide containerized versions on [quay.io/rebuy/aws-nuke](https://quay.io/rebuy/aws-nuke)
and [docker.io/rebuy/aws-nuke](https://hub.docker.com/r/rebuy/aws-nuke) (mirror).


Expand Down
12 changes: 6 additions & 6 deletions golang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ vendor: go.mod go.sum
format:
gofmt -s -w $(GOFILES)

vet: vendor
vet: go_generate vendor
go vet $(GOPKGS)

lint:
Expand All @@ -45,13 +45,13 @@ go_generate:
rm -rvf mocks
go generate ./...

test_packages: vendor
test_packages: go_generate vendor
go test $(GOPKGS)

test_format:
gofmt -s -l $(GOFILES)

test: test_format go_generate vet lint test_packages
test: test_format vet lint test_packages

cov: go_generate
gocov test -v $(GOPKGS) \
Expand All @@ -65,17 +65,17 @@ _build: vendor
$(TARGET);\
)

build: _build
build: go_generate _build
$(foreach TARGET,$(TARGETS),ln -sf $(OUTPUT_FILE) dist/$(OUTPUT_LINK);)

compress: _build
tar czf dist/$(OUTPUT_FILE).tar.gz dist/$(OUTPUT_FILE)

xc:
xc: go_generate
GOOS=linux GOARCH=amd64 make compress
GOOS=darwin GOARCH=amd64 make compress

install: vendor test
install: test
$(foreach TARGET,$(TARGETS),go install \
$(BUILD_FLAGS);)

Expand Down