This Grunt plugin, `grunt-bump-build-git` (current stable version 1.1.3), streamlines the release process for JavaScript projects. It integrates version bumping (following semver), project building via custom Grunt tasks, and Git operations (add, commit, tag) into a single, configurable step. It differentiates itself by providing a comprehensive, automated workflow for releases directly within the Grunt ecosystem, updating `package.json` and other specified JSON files with the new version. The plugin is designed for projects using Grunt `~0.4.2` or higher and runs on Node.js versions `0.8.0` and above. Its release cadence is tied to its maintenance, likely infrequent given its age and the current landscape of build tools, but it remains functional for legacy Grunt-based projects. It aims to reduce manual steps and potential errors during a project's release cycle.
npm install grunt-bump-build-gitVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure and use the `grunt-bump-build-git` plugin within a Gruntfile to automate version bumping, running custom build tasks, and committing/tagging changes in Git.
Escape colons with a backslash, e.g., `grunt build:minor:"Set visibility\\:true by default."`. Note the double backslash when used in a shell to ensure the backslash itself is passed.
Upgrade Grunt in your project to at least `0.4.2` by running `npm install grunt@~0.4.2 --save-dev`.
Ensure `git init` has been run in your project root. For automated environments (CI/CD), configure Git with appropriate credentials (e.g., deploy keys, personal access tokens) for the repository.
Verify that all tasks listed in `build.tasks` are properly registered using `grunt.registerTask` or loaded via `grunt.loadNpmTasks` for third-party plugins.
Ensure `grunt.loadNpmTasks('grunt-bump-build-git');` is present and correctly placed in your Gruntfile.js, and that your Gruntfile has no syntax errors.Initialize a Git repository in your project's root directory by running `git init`.
Adjust the file permissions for the affected JSON files (e.g., `chmod 644 package.json`) or run Grunt with elevated privileges if appropriate for your environment.