-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (19 loc) · 1.21 KB
/
Makefile
File metadata and controls
24 lines (19 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.PHONY: all test release
all:
npm install syntaxdev@0.0.6
test: release
# Run tests
./node_modules/.bin/syntaxdev test --tests test/**/*.py --syntax grammars/MagicPython.YAML-tmLanguage --add-syntax grammars/MagicRegExp.YAML-tmLanguage
./node_modules/.bin/syntaxdev test --tests test/**/*.regexp --syntax grammars/MagicRegExp.YAML-tmLanguage
# Check if the version specified in "package.json" matches the latest git tag
@if [ \
`cat package.json | grep -e '^[[:space:]]*"version":' | sed -e 's/[[:space:]]*"version":[[:space:]]*"\(.*\)",/\1/'` \
!= \
`git describe --tags --abbrev=0 | sed -e 's/v\([[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\).*/\1/'` \
] ; \
then echo "Error: package.version != git.tag" && exit 1 ; fi
release:
./node_modules/.bin/syntaxdev build-plist --in grammars/MagicPython.YAML-tmLanguage --out grammars/MagicPython.tmLanguage
./node_modules/.bin/syntaxdev build-plist --in grammars/MagicRegExp.YAML-tmLanguage --out grammars/MagicRegExp.tmLanguage
./node_modules/.bin/syntaxdev build-cson --in grammars/MagicPython.YAML-tmLanguage --out grammars/MagicPython.cson
./node_modules/.bin/syntaxdev build-cson --in grammars/MagicRegExp.YAML-tmLanguage --out grammars/MagicRegExp.cson