grunt-git-rev-parse

Get git commit id

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
grunt-git-rev-parse
200.1.57 years ago9 years agoMinified + gzip package size for grunt-git-rev-parse in KB

Readme

grunt-git-rev-parse
A git tool for grunt
Get git commit id

Getting Started

This plugin requires Grunt ~0.4.0
First of all, you need to install this plugin by npm,
npm install grunt-git-rev-parse --save-dev
And second, you need to load this task in your grunt file.
grunt.loadNpmTasks('grunt-git-rev-parse');

The "git-rev-parse" task

Overview

In your project's Gruntfile, add a section named git-rev-parse to the data object passed into grunt.initConfig().
grunt.initConfig({
  "git-rev-parse": {
    "options": {
      // Task-specific options go here.
    }
  },
})

Options

options.prop

Type: String
Default value: ''
A string value that is used as a property name for storing the result of this task

options.number

Type: Number
Default value: 6
The number of SHA1 value. Under the hood, this is the 'number' of git command --short=[number]

options.silent

Type: Boolean
Default value: false
If true the task will not print the result on success. Error-messages will still be printed.
Inspired by Mikael Karon grunt-git-describe