-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
48 lines (39 loc) · 1.2 KB
/
Makefile
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
export GITHUB_TOKEN = ${GO_RELEASER_GITHUB_TOKEN}
.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
| sort \
| egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
install:
go install doxctl
add_commit_push:
git add .
git commit -m "Makefile commit"
git push
dryrun:
goreleaser --snapshot --skip-publish --rm-dist --debug
build:
goreleaser build --rm-dist --debug
tag:
scripts/version-up.sh --patch --apply
release:
goreleaser release --rm-dist
commit:
make tag ; git add . ; git commit -m "Makefile commit" ; git push #; make tag
test:
go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
### Useful for debugging ###
#goreleaser release --skip-validate --rm-dist --debug #--skip-publish
##########################################################3
# $ mkdir doxctl && cd doxctl
# $ go mod init doxctl
# $ go get -u github.com/spf13/cobra/cobra
# $ cobra init --pkg-name doxctl
# $ go get github.com/mitchellh/[email protected]
# $ go install doxctl
#
#
#
# REFS:
# - https://towardsdatascience.com/how-to-create-a-cli-in-golang-with-cobra-d729641c7177