-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
68 lines (52 loc) · 2.62 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
PACKAGES=$(shell go list ./...)
# build paramters
BUILD_FOLDER = build
APP_VERSION = $(git describe --tags --always)
clean:
rm -rf ~/.config/cosmos-cash-agent
run-dev:
CASH_ENV=dev go run cmd/edge-agent/main.go
run-live:
CASH_ENV=live go run cmd/edge-agent/main.go
###############################################################################
### DOCKER ###
###############################################################################
docker-build-webhook:
docker build -f docker/webhook-relayer/Dockerfile -t webhook-relayer:main .
###############################################################################
### CI / CD ###
###############################################################################
test-ci:
go test -coverprofile=coverage.txt -covermode=atomic -mod=readonly $(PACKAGES)
###############################################################################
### RELEASE ###
###############################################################################
changelog:
git-chglog --output CHANGELOG.md
git-release-prepare:
@echo making release $(APP_VERSION)
ifndef APP_VERSION
$(error APP_VERSION is not set, please specifiy the version you want to tag)
endif
git tag $(APP_VERSION)
git-chglog --output CHANGELOG.md
git tag $(APP_VERSION) --delete
git add CHANGELOG.md && git commit -m "chore: update changelog for $(APP_VERSION)"
@echo release complete
git-tag:
ifndef APP_VERSION
$(error APP_VERSION is not set, please specifiy the version you want to tag)
endif
ifneq ($(shell git rev-parse --abbrev-ref HEAD),main)
$(error you are not on the main branch. aborting)
endif
git tag -s -a "$(APP_VERSION)" -m "Changelog: https://github.com/allinbits/cosmos-cash/blob/main/CHANGELOG.md"
_release-patch:
$(eval APP_VERSION = $(shell git describe --tags | awk -F '("|")' '{ print($$1)}' | awk -F. '{$$NF = $$NF + 1;} 1' | sed 's/ /./g'))
release-patch: _release-patch git-release-prepare
_release-minor:
$(eval APP_VERSION = $(shell git describe --tags | awk -F '("|")' '{ print($$1)}' | awk -F. '{$$(NF-1) = $$(NF-1) + 1;} 1' | sed 's/ /./g' | awk -F. '{$$(NF) = 0;} 1' | sed 's/ /./g'))
release-minor: _release-minor git-release-prepare
_release-major:
$(eval APP_VERSION = $(shell git describe --tags | awk -F '("|")' '{ print($$1)}' | awk -F. '{$$(NF-2) = $$(NF-2) + 1;} 1' | sed 's/ /./g' | awk -F. '{$$(NF-1) = 0;} 1' | sed 's/ /./g' | awk -F. '{$$(NF) = 0;} 1' | sed 's/ /./g' ))
release-major: _release-major git-release-prepare