Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

New Grunt task for making releases

  • Loading branch information...
commit 21a802b663f08a2fb6c0cb317c0a76da0a7bae64 1 parent 9bbe8d2
Henri Bergius bergie authored
Showing with 28 additions and 1 deletion.
  1. +24 −0 Gruntfile.coffee
  2. +4 −1 package.json
24 Gruntfile.coffee
View
@@ -33,12 +33,36 @@ module.exports = ->
level: 'warn'
components: ['src/components/*.coffee']
+ bumpup: 'package.json'
+ tagrelease:
+ file: 'package.json'
+ prefix: ''
+ exec:
+ npm_publish:
+ cmd: 'npm publish'
+
# Load Grunt plugins
@loadNpmTasks 'grunt-contrib-coffee'
@loadNpmTasks 'grunt-contrib-nodeunit'
@loadNpmTasks 'grunt-coffeelint'
+ @loadNpmTasks 'grunt-bumpup'
+ @loadNpmTasks 'grunt-tagrelease'
+ @loadNpmTasks 'grunt-exec'
# Our local tasks
@registerTask 'build', ['coffee']
@registerTask 'lint', ['coffeelint']
@registerTask 'test', ['build', 'lint', 'nodeunit']
+ @registerTask 'default', ['test']
+
+ # Task for releasing new NoFlo versions
+ #
+ # Builds, runs tests, updates package.json, tags a release, and publishes on NPM
+ #
+ # Usage: grunt release:patch
+ @registerTask 'release', (type = 'patch') =>
+ @task.run 'build'
+ @task.run 'test'
+ @task.run "bumpup:#{type}"
+ @task.run 'tagrelease'
+ @task.run 'exec:npm_publish'
5 package.json
View
@@ -35,7 +35,10 @@
"grunt-contrib-coffee": "~0.6.6",
"grunt-cli": "~0.1.7",
"grunt-contrib-nodeunit": "~0.1.2",
- "grunt-coffeelint": "0.0.6"
+ "grunt-coffeelint": "0.0.6",
+ "grunt-bumpup": "~0.2.0",
+ "grunt-tagrelease": "~0.2.0",
+ "grunt-exec": "~0.4.0"
},
"main": "./lib/NoFlo",
"bin": {
Please sign in to comment.
Something went wrong with that request. Please try again.