forked from ekalinin/sitemap.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 781 Bytes
/
Makefile
File metadata and controls
32 lines (23 loc) · 781 Bytes
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
.PHONY: deploy deploy-github deploy-npm test env
VERSIONS_COUNT=`grep 'version' package.json bower.json index.js | grep -o -E '[0-9]\.[0-9]{1,2}\.[0-9]{1,2}' | sort | uniq | wc -l`
env:
@rm -rf env && \
virtualenv env && \
. env/bin/activate && \
pip install nodeenv && \
nodeenv -p --prebuilt && \
npm install
test:
./node_modules/expresso/bin/expresso ./tests/sitemap.test.js
test-perf:
node tests/perf.js
deploy-github:
@git tag `grep "version" package.json | grep -o -E '[0-9]\.[0-9]{1,2}\.[0-9]{1,2}'`
@git push --tags origin master
deploy-npm:
npm publish
check-versions:
@if [ "$(VERSIONS_COUNT)" != "1" ]; then\
echo "\n\tVersions in *.js and *.json are different!\n";\
exit 1; fi
deploy: test check-versions deploy-npm deploy-github