-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (36 loc) · 658 Bytes
/
Makefile
File metadata and controls
49 lines (36 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
SHELL := /bin/sh
export PATH := $(PATH)
all: fmt lintfix tidy test clean build
debug:
@echo "PATH: $(PATH)"
@echo "GOPATH: $(shell go env GOPATH)"
@which go
@which gofumpt
@which golangci-lint
clean:
rm -rf ./dist
# Test
test:
go test ./...
tidy:
go mod tidy
# Format code
fmt:
gofumpt -l -w .
# Run linter
lint: fmt
golangci-lint run
# Run linter and fix
lintfix: fmt
golangci-lint run --fix
build: clean
mkdir ./dist
go build -o ./dist/gmi2html ./cmd/gmi2html
build-gccgo: clean
go build -compiler=gccgo -o ./dist/gmi2html ./cmd/gmi2html
show-updates:
go list -m -u all
update:
go get -u all
update-patch:
go get -u=patch all