-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (36 loc) · 1.1 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
VERSION=v1.0.0
PATH_BUILD=dist/
FILE_COMMAND=butcherctl
FILE_ARCH=linux
clean:
@rm -rf ./dist
commit:
# git pull
# git pull --recurse-submodules origin master
# git add .; git commit -am "Kratos power";git push
# git tag -a $(VERSION) -m "Kratos Power"
# git push origin $(VERSION)
git add -A && git commit -m "$(curl -s whatthecommit.com/index.txt)" && git push
build: clean commit local
deploy:
goreleaser --rm-dist
version:
@echo $(VERSION)
install:
install -d -m 755 '$(HOME)/bin/'
install $(PATH_BUILD)$(VERSION)/$(FILE_ARCH)/$(FILE_COMMAND) '$(HOME)/bin/$(FILE_COMMAND)'
setup:
# git config --global url."[email protected]:".insteadOf "https://github.com/"
# go get -d -v git.prod.cellulant.com/ops-templates/ci-cd-tools/devops-kratos
# cd $HOME/go/src/git.prod.cellulant.com/ops-templates/ci-cd-tools/devops-kratos
# git pull --recurse-submodules origin master
# dep init
# dep ensure -vendor-only
go mod tidy
local:
#export GO111MODULE=off
rm -rf build
go build -o build/$(FILE_COMMAND) main.go
# sudo install ./$(FILE_COMMAND) '/usr/local/bin/$(FILE_COMMAND)'
run: local
./build/$(FILE_COMMAND)