Skip to content

Instantly share code, notes, and snippets.

@marcusoftnet
Created June 19, 2014 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusoftnet/9111f3454fdfdadccba6 to your computer and use it in GitHub Desktop.
Save marcusoftnet/9111f3454fdfdadccba6 to your computer and use it in GitHub Desktop.
Total Make file
BIN = ./node_modules/.bin
define release
VERSION=`node -pe "require('./package.json').version"` && \
NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1)')"` && \
node -e "\
var j = require('./package.json');\
j.version = \"$$NEXT_VERSION\";\
var s = JSON.stringify(j, null, 2);\
require('fs').writeFileSync('./package.json', s);" && \
git commit -m "release $$NEXT_VERSION" -- package.json && \
git tag "$$NEXT_VERSION" -m "release $$NEXT_VERSION"
endef
.PHONY: test
createMinorRelease:
@$(call release,minor)
test:
@$(BIN)/mocha \
--harmony-generators \
-u bdd \
-R dot \
-b
pushGithub:
git push --tags origin HEAD:master
pushHeroku:
git push heroku master
launch:
heroku open
deployProd: test createMinorRelease pushGithub pushHeroku launch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment