Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.PHONY: dev
dev: ## dev build
dev: clean install generate build fmt lint test mod-tidy build-snapshot
dev: clean generate build fmt lint test mod-tidy build-snapshot

.PHONY: ci
ci: ## CI build
Expand All @@ -14,13 +14,6 @@ clean: ## remove files created during build
rm -rf dist
rm -f coverage.*

.PHONY: install
install: ## install build tools
$(call print-target)
cd tools && go install mvdan.cc/gofumpt/gofumports
cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint
cd tools && go install github.com/goreleaser/goreleaser

.PHONY: generate
generate: ## go generate
$(call print-target)
Expand All @@ -32,13 +25,14 @@ build: ## go build
go build -o /dev/null ./...

.PHONY: fmt
fmt: ## gofumports
fmt: ## go fmt
$(call print-target)
gofumports -l -w -local github.com/golang-templates/seed . || true
go fmt ./...

.PHONY: lint
lint: ## golangci-lint
$(call print-target)
cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint
golangci-lint run

.PHONY: test
Expand All @@ -56,6 +50,7 @@ mod-tidy: ## go mod tidy
.PHONY: build-snapshot
build-snapshot: ## goreleaser --snapshot --skip-publish --rm-dist
$(call print-target)
cd tools && go install github.com/goreleaser/goreleaser
goreleaser --snapshot --skip-publish --rm-dist

.PHONY: diff
Expand Down
3 changes: 1 addition & 2 deletions cmd/seed/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ import (
func Test_greet(t *testing.T) {
got := greet()

want := "Hi!"
assert.Equal(t, want, got, "should properly greet")
assert.Equal(t, "Hi!", got, "should properly greet")
}
Loading