Skip to content

Commit

Permalink
feat(*): add grunt-deploy-semver
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjanssen committed Jul 21, 2014
1 parent a535a09 commit ee6c241
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
28 changes: 28 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'use strict';
/* jshint camelcase: false */

module.exports = function (grunt) {

grunt.loadNpmTasks('grunt-deploy-semver');

grunt.initConfig({
deploy: {
options: {
versionFiles: [
'package.json',
'bower.json'
],
postDeployFn: function (grunt, newVersion, done) {
if (!grunt.option('soft')) {
var exec = require('child_process').exec;
exec('npm publish', null, function (err, stdout) {
console.log(stdout);
done();
});
}
}
}
}
});

};
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@
"bugs": {
"url": "https://github.com/sofa/sofa-testing/issues"
},
"homepage": "http://www.sofa.io"
"homepage": "http://www.sofa.io",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-deploy-semver": "^0.4.3"
}
}

0 comments on commit ee6c241

Please sign in to comment.