-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathMakefile
32 lines (27 loc) · 920 Bytes
/
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
build:
go build
npm run build
release: check-env
@echo 'Hopefully "git diff" is empty!'
@echo 'Creating release for version $(version) ...'
@echo 'Manually change the version in these 2 files to $(version) and I, your loyal, Makefile, shall do the rest!'
@emacsclient -t package.json
@emacsclient -t package-lock.json
@git add -p package.json package-lock.json
@git commit -m 'Version bump to v$(version)'
@git tag v$(version)
@git push --tags origin develop
deploy: check-env
@tar zcvpf releases/leapchat-v$(version)-$$(mydate.sh).tar.gz ./leapchat ./db ./build
$(MAKE) upload
upload:
@scp $$(ls -t releases/*.tar.gz | head -1) leapchat-minishare:~/gocode/src/github.com/cryptag/leapchat/releases/
@ssh leapchat-minishare
all-deploy:
$(MAKE) -B build
$(MAKE) release
$(MAKE) deploy
check-env:
ifndef version
$(error "version" variable is undefined; re-run with "version=1.2.3" or similar)
endif