├── .gitignore ├── .npmignore ├── .editorconfig ├── Gruntfile.coffee ├── test └── test_load.js ├── LICENSE ├── package.json ├── CONTRIBUTING.md ├── README.md └── tasks └── bump.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | test/tmp 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | test/* 2 | .editorconfig 3 | .gitignore 4 | Gruntfile.coffee 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /Gruntfile.coffee: -------------------------------------------------------------------------------- 1 | module.exports = (grunt) -> 2 | # load all npm grunt tasks 3 | require('load-grunt-tasks') grunt 4 | 5 | grunt.initConfig 6 | jshint: 7 | options: node: true 8 | task: ['tasks/*.js'] 9 | test: ['<%= nodeunit.tests %>'] 10 | 11 | clean: tests: ['tmp'] 12 | nodeunit: tests: ['test/test_*.js'] 13 | 14 | 'auto-release': options: checkTravisBuild: false 15 | 'npm-contributors': options: commitMessage: 'chore: update contributors' 16 | bump: 17 | options: 18 | files: ['package.json'] 19 | commitFiles: ['package.json'] 20 | 21 | # Actually load this plugin's task. Mainly for testing 22 | grunt.loadTasks('tasks') 23 | 24 | grunt.registerTask 'test', ['clean', 'jshint:test', 'nodeunit'] 25 | 26 | grunt.registerTask 'default', ['jshint:task'] 27 | 28 | grunt.registerTask 'release', 'Build, bump and publish to NPM.', (type) -> 29 | grunt.task.run [ 30 | 'npm-contributors' 31 | "bump:#{type||'patch'}" 32 | 'npm-publish' 33 | ] 34 | -------------------------------------------------------------------------------- /test/test_load.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var grunt = require('grunt'); 4 | 5 | /* 6 | ======== A Handy Little Nodeunit Reference ======== 7 | https://github.com/caolan/nodeunit 8 | 9 | Test methods: 10 | test.expect(numAssertions) 11 | test.done() 12 | Test assertions: 13 | test.ok(value, [message]) 14 | test.equal(actual, expected, [message]) 15 | test.notEqual(actual, expected, [message]) 16 | test.deepEqual(actual, expected, [message]) 17 | test.notDeepEqual(actual, expected, [message]) 18 | test.strictEqual(actual, expected, [message]) 19 | test.notStrictEqual(actual, expected, [message]) 20 | test.throws(block, [error], [message]) 21 | test.doesNotThrow(block, [error], [message]) 22 | test.ifError(value) 23 | */ 24 | 25 | exports.bump = { 26 | setUp: function (done) { 27 | // setup here if necessary 28 | done(); 29 | }, 30 | load: function (test) { 31 | test.expect(1); 32 | 33 | var actual = require('../tasks/bump'); 34 | var expected = 'function'; 35 | test.equal(typeof actual, expected, 'Should export a function'); 36 | 37 | test.done(); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Alan Accurso 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grunt-bump-cordova", 3 | "description": "Bump package version", 4 | "version": "0.1.8", 5 | "homepage": "https://github.com/aaccurso/grunt-bump-cordova", 6 | "author": { 7 | "name": "Alan Accurso", 8 | "email": "accurso.alan@gmail.com" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/aaccurso/grunt-bump-cordova.git" 13 | }, 14 | "bugs": { 15 | "url": "https://github.com/aaccurso/grunt-bump-cordova/issues" 16 | }, 17 | "main": "tasks/bump.js", 18 | "engines": { 19 | "node": ">= 0.8.0" 20 | }, 21 | "scripts": { 22 | "test": "grunt nodeunit" 23 | }, 24 | "license": "MIT", 25 | "dependencies": { 26 | "elementtree": "^0.1.6", 27 | "semver": "~2.3.0" 28 | }, 29 | "peerDependencies": { 30 | "grunt": ">=0.4.0" 31 | }, 32 | "devDependencies": { 33 | "grunt": "^0.4.0", 34 | "grunt-auto-release": "^0.0.6", 35 | "grunt-contrib-clean": "^0.5.0", 36 | "grunt-contrib-jshint": "^0.10.0", 37 | "grunt-contrib-nodeunit": "^0.4.0", 38 | "grunt-npm": "^0.0.2", 39 | "load-grunt-tasks": "^0.4.0" 40 | }, 41 | "keywords": [ 42 | "gruntplugin", 43 | "cordova", 44 | "bump", 45 | "version" 46 | ], 47 | "contributors": [ 48 | "aaccurso ", 49 | "Alan Accurso ", 50 | "Eddie Monge ", 51 | "Mathias Paumgarten ", 52 | "Jules Robichaud-Gagnon ", 53 | "Elfrey Shira ", 54 | "Jonas Rabbe ", 55 | "travis4all ", 56 | "adam j. sontag ", 57 | "RobinQu ", 58 | "Snugug ", 59 | "Theodor Tonum ", 60 | "Thibaut Lemesle ", 61 | "angleman ", 62 | "cattail ", 63 | "Adam Biggs ", 64 | "ylesaout ", 65 | "Gavin ", 66 | "George Antoniadis ", 67 | "Jarrett Drouillard ", 68 | "Jules Robichaud-Gagnon ", 69 | "Mathias Paumgarten ", 70 | "Maxime Francois ", 71 | "Mayhem ", 72 | "Michael Hellein ", 73 | "Mário Gonçalves " 74 | ] 75 | } 76 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | * When submitting an issue, please make sure the plugin is up-to-date, and provide the command(s) and/or configurations that cause the issue. 4 | * When submitting a PR, make sure that the commit message matchs the [AngularJS conventions][commit-message-format] (see below). 5 | * When submitting a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix. 6 | * When submitting a new feature, add tests that cover the feature. 7 | 8 | ## Git Commit Guidelines 9 | 10 | These rules are adopted from the AngularJS project with the exception that the scope part is optional. 11 | 12 | ### Commit Message Format 13 | Each commit message consists of a **header**, a **body** and a **footer**. The header has a special 14 | format that includes a **type**, a **scope** and a **subject**: 15 | 16 | ``` 17 | (): 18 | 19 | 20 | 21 |