-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
42 lines (30 loc) · 678 Bytes
/
makefile
File metadata and controls
42 lines (30 loc) · 678 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
APP=safe
PROJECT=github.com/nobe4/${APP}
# YYYY.MM.Count
VERSION?=2021.04.3
COMMIT?=$(shell git rev-parse --short HEAD)
BUILD_TIME?=$(shell date -u '+%Y-%m-%d_%H:%M:%S')
default: | build
version:
@echo -n ${VERSION}
app-name:
@echo -n ${APP}
build:
goreleaser --snapshot --rm-dist
# Used for manually releasing, normally running in github actions.
release:
ifneq ($(shell git symbolic-ref --short HEAD),master)
$(error Not on master branch)
endif
goreleaser --rm-dist
lint:
golangci-lint run
test:
go test ./...
bump:
./scripts/bump.sh
git add makefile
git commit -m "Bump version" --edit
tag:
./scripts/tag.sh
.PHONY: bump tag lint test app-name version