Skip to content

Commit dc4f876

Browse files
author
Manatsawin Hanmongkolchai
committed
Fix all the broken merges
1 parent 9169e74 commit dc4f876

2 files changed

Lines changed: 10 additions & 33 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ and this project adheres to [0ver](https://0ver.org) (more or less).
103103
- LICENSE
104104
- README
105105

106-
[Unreleased]: https://github.com/mvisonneau/vac/compare/v0.0.7...HEAD
106+
[Unreleased]: https://github.com/mvisonneau/vac/compare/v0.0.8...HEAD
107+
[v0.0.8]: https://github.com/mvisonneau/vac/tree/v0.0.8
107108
[v0.0.7]: https://github.com/mvisonneau/vac/tree/v0.0.7
108109
[v0.0.6]: https://github.com/mvisonneau/vac/tree/v0.0.6
109110
[v0.0.5]: https://github.com/mvisonneau/vac/tree/v0.0.5

Makefile

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
NAME := vac
2-
FILES := $(shell git ls-files */*.go)
2+
COVERAGE_FILE := coverage.out
33
REPOSITORY := mvisonneau/$(NAME)
44
.DEFAULT_GOAL := help
55

6-
.PHONY: setup
7-
setup: ## Install required libraries/tools for build tasks
8-
@command -v gofumpt 2>&1 >/dev/null || go install mvdan.cc/gofumpt@v0.2.1
9-
@command -v gosec 2>&1 >/dev/null || go install github.com/securego/gosec/v2/cmd/gosec@v2.9.6
10-
@command -v ineffassign 2>&1 >/dev/null || go install github.com/gordonklaus/ineffassign@v0.0.0-20210914165742-4cc7213b9bc8
11-
@command -v misspell 2>&1 >/dev/null || go install github.com/client9/misspell/cmd/misspell@v0.3.4
12-
@command -v revive 2>&1 >/dev/null || go install github.com/mgechev/revive@v1.1.3
13-
146
.PHONY: fmt
157
fmt: ## Format source code
168
go run mvdan.cc/gofumpt@v0.6.0 -w $(shell git ls-files **/*.go)
@@ -22,7 +14,13 @@ lint: ## Run all lint related tests upon the codebase
2214

2315
.PHONY: test
2416
test: ## Run the tests against the codebase
25-
go test -v -count=1 -race ./...
17+
@rm -rf $(COVERAGE_FILE)
18+
go test -v -count=1 -race ./... -coverprofile=$(COVERAGE_FILE)
19+
@go tool cover -func $(COVERAGE_FILE) | awk '/^total/ {print "coverage: " $$3}'
20+
21+
.PHONY: coverage
22+
coverage: ## Prints coverage report
23+
go tool cover -func $(COVERAGE_FILE)
2624

2725
.PHONY: install
2826
install: ## Build and install locally the binary (dev purpose)
@@ -49,28 +47,6 @@ prerelease: ## Build & prerelease the binaries (edge)
4947
clean: ## Remove binary if it exists
5048
rm -f $(NAME)
5149

52-
.PHONY: coverage
53-
coverage: ## Generates coverage report
54-
rm -rf *.out
55-
go test -count=1 -race -v ./... -coverpkg=./... -coverprofile=coverage.out
56-
57-
.PHONY: coverage-html
58-
coverage-html: ## Generates coverage report and displays it in the browser
59-
go tool cover -html=coverage.out
60-
61-
.PHONY: dev-env
62-
dev-env: ## Build a local development environment using Docker
63-
@docker run -it --rm \
64-
-v $(shell pwd):/go/src/github.com/mvisonneau/$(NAME) \
65-
-w /go/src/github.com/mvisonneau/$(NAME) \
66-
golang:1.17 \
67-
/bin/bash -c 'make setup; make install; bash'
68-
69-
.PHONY: is-git-dirty
70-
is-git-dirty: ## Tests if git is in a dirty state
71-
@git status --porcelain
72-
@test $(shell git status --porcelain | grep -c .) -eq 0
73-
7450
.PHONY: all
7551
all: lint test build coverage ## Test, builds and ship package for all supported platforms
7652

0 commit comments

Comments
 (0)