forked from davidchambers/string-format
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 619 Bytes
/
Makefile
File metadata and controls
27 lines (21 loc) · 619 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
.PHONY: compile clean release setup test
bin = node_modules/.bin
compile:
@$(bin)/coffee --compile --output lib src
clean:
@rm -rf node_modules
@git checkout -- lib
release:
ifndef VERSION
$(error VERSION is undefined)
endif
@sed -i '' 's!\("version": "\)[0-9.]*\("\)!\1$(VERSION)\2!' package.json
@sed -i '' "s!\(.version = '\)[0-9.]*\('\)!\1$(VERSION)\2!" src/string-format.coffee
@make
@git add package.json src/string-format.coffee lib/string-format.js
@git commit --message $(VERSION)
@echo 'remember to run `npm publish`'
setup:
@npm install
test:
@$(bin)/mocha --compilers coffee:coffee-script