forked from selectize/selectize.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
33 lines (32 loc) · 902 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
33
.PHONY: compile release test
plugins=*
GRUNT=node_modules/.bin/grunt
all: compile
test:
npm test
compile:
$(GRUNT) --plugins=$(plugins)
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)"/' selectize.jquery.json
sed -i.bak 's/"version": "[^"]*"/"version": "$(version)"/' package.json
rm *.bak
make compile
npm test || exit 1
cp dist/js/standalone/selectize.js ../.selectize.js
git add .
git commit -a -m "Released $(version)."
git tag v$(version)
git push origin master
git push origin --tags
npm publish
git checkout gh-pages
mv -f ../.selectize.js js/selectize.js
git commit -a -m "Updated selectize.js to latest version."
git push origin gh-pages
git checkout master
@echo "\033[32mv${version} released\033[0;39m"
endif