forked from brianreavis/sifter.js
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
27 lines (23 loc) · 632 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
.PHONY: compile release benchmark
all: compile
benchmark:
node --expose-gc benchmark/index.js
compile:
npm run build
release:
ifeq ($(strip $(version)),)
@echo "\033[31mERROR:\033[0;39m No version provided."
@echo "\033[1;30mmake release version=1.0.0\033[0;39m"
else
sed -i.bak 's/"version": "[^"]*"/"version": "$(version)"/' package.json
sed -i.bak 's/"version": "[^"]*"/"version": "$(version)"/' bower.json
rm *.bak
make compile
git add .
git commit -a -m "Released $(version)."
git tag v$(version)
git push origin master
git push origin --tags
npm publish
@echo "\033[32mv${version} released\033[0;39m"
endif