grunt-jenkins-svn-revision

0.1.1 • Public • Published

grunt-jenkins-svn-revision

Adds revision property to package.json and bower.json using the Jenkins SVN revision number.

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-jenkins-svn-revision --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-jenkins-svn-revision');

The "jenkins_svn_revision" task

Overview

Setup the task like so:

jenkins_svn_revision: {
  options: {
    files: ['package.json']
  }
}

the task will attempt to get the process.env.SVN_REVISION from jenkins. If you supply a revision number it will override jenkins, for example jenkins_svn_revision:123. If neither is provided the task will fail.

files should be an array of json files, for example package.json and bower.json.

/grunt-jenkins-svn-revision/

    Package Sidebar

    Install

    npm i grunt-jenkins-svn-revision

    Weekly Downloads

    0

    Version

    0.1.1

    License

    none

    Last publish

    Collaborators

    • facultymatt