Add make task for releasing new versions

This commit is contained in:
Andrew Stewart 2014-03-28 12:29:33 -07:00
parent a98a5de44f
commit fe931d0b60
1 changed files with 9 additions and 1 deletions

View File

@ -1,8 +1,10 @@
BIN := ./node_modules/.bin
TEST_FILES := test/support/globals.js $(shell find test/specs -type f -name "*.js")
VERSION := $(shell node -e "console.log(require('./package.json').version)")
# Our 'phony' make targets (don't involve any file changes)
.PHONY: test bdd lint
.PHONY: test bdd lint release
# Run Mocha, with standard reporter.
test:
@ -15,3 +17,9 @@ bdd:
# Run JSHint
lint:
@$(BIN)/jshint ./lib
# Cuts/publishes a new release
release:
@git tag -m "$(VERSION)" v$(VERSION)
@git push --tags
@npm publish ./