-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 726 Bytes
/
Copy pathMakefile
File metadata and controls
45 lines (34 loc) · 726 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
CONFIG_FILE_PATH=$(HOME)/.config/gitnotes
CONFIG_FILE=gn.conf
all: build
.PHONY: build
build:
go build -o ./dist/gn main.go
# compile and run edit command
run:
go run main.go edit
.PHONY: test
test:
go test ./... -race
fmt:
go fmt ./...
# install gitnotes into /usr/local/bin
# needs sudo
.PHONY: install
install: ./dist/gn
sudo cp ./dist/gn /usr/local/bin/gn
mkdir -p $(CONFIG_FILE_PATH)
.PHONY: lint
lint:
golangci-lint run . --enable-all
.PHONY: clean
clean:
rm ./dist/gn
./dist/gn:
make build
.PHONY: build-test-container
build-test-container:
docker build -t gn-test-runner:latest -f test/Dockerfile .
.PHONY: test-integration
test-integration: build-test-container
docker run gn-test-runner:latest