Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/facultymatt/grunt-jenkins-svn-revision
Adds revision property to package.json and bower.json using the Jenkins SVN revision number.
https://github.com/facultymatt/grunt-jenkins-svn-revision
Last synced: about 1 month ago
JSON representation
Adds revision property to package.json and bower.json using the Jenkins SVN revision number.
- Host: GitHub
- URL: https://github.com/facultymatt/grunt-jenkins-svn-revision
- Owner: facultymatt
- License: mit
- Created: 2014-06-11T22:20:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-21T02:25:53.000Z (almost 9 years ago)
- Last Synced: 2024-04-23T18:15:18.418Z (9 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# 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](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
```shell
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:
```js
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.