Ver Fonte

chore(grunt): add bump grunt taks

Estevão Soares dos Santos há 10 anos atrás
pai
commit
1c80fcc2cf
2 ficheiros alterados com 21 adições e 1 exclusões
  1. 20 1
      Gruntfile.js
  2. 1 0
      package.json

+ 20 - 1
Gruntfile.js

@@ -59,6 +59,24 @@ module.exports = function (grunt) {
         dest: 'CHANGELOG.md'
       }
     },
+    bump: {
+      options: {
+        files: ['package.json'],
+        updateConfigs: [],
+        commit: true,
+        commitMessage: 'Release version %VERSION%',
+        commitFiles: ['package.json'],
+        createTag: true,
+        tagName: '%VERSION%',
+        tagMessage: 'Version %VERSION%',
+        push: true,
+        pushTo: 'upstream',
+        gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
+        globalReplace: false,
+        prereleaseName: 'alpha',
+        regExp: false
+      }
+    },
     simplemocha: {
       node: {
         src: 'test/node/**/*.js',
@@ -86,6 +104,7 @@ module.exports = function (grunt) {
   grunt.loadNpmTasks('grunt-simple-mocha');
   grunt.loadNpmTasks('grunt-jscs');
   grunt.loadNpmTasks('grunt-conventional-changelog');
+  grunt.loadNpmTasks('grunt-bump');
 
   grunt.registerTask('lint', ['jshint', 'jscs']);
   grunt.registerTask('test', ['lint', 'concat', 'simplemocha']);
@@ -94,5 +113,5 @@ module.exports = function (grunt) {
   grunt.registerTask('prep-release', ['build', 'changelog']);
 
   // Default task(s).
-  grunt.registerTask('default', []);
+  grunt.registerTask('default', ['test']);
 };

+ 1 - 0
package.json

@@ -33,6 +33,7 @@
   "devDependencies": {
     "chai": "^1.10.0",
     "grunt": "^0.4.5",
+    "grunt-bump": "^0.3.1",
     "grunt-contrib-concat": "^0.5.0",
     "grunt-contrib-jshint": "^0.10.0",
     "grunt-contrib-uglify": "^0.6.0",