title: Trying to get the git commit ID in grunt
body: <p>I would like to have to git commit ID be part of the zip file I create. I'm trying to use <code>grunt-git-rev-parse</code> but am having no luck. My zip file is <code>name-.zip</code> not <code>name-3A5BC3.zip</code>. How do I go about getting the git commit ID into my filename?</p>
  
  <pre><code>module.exports = function(grunt) {
    grunt.initConfig({
      pkg: grunt.file.readJSON('package.json'),
      "git-rev-parse": {
        options: {
          prop: 'git-revision',
          number: 6
        }
      },
  
      jshint: { 
        options: {
          curly: true,
          eqeqeq: true,
          eqnull: true,
          browser: true,
          globals: {
            jQuery: true
          },
        },
        all: ['gruntfile.js', 'public/javascripts/**/*.js'],
      },
  
      bower: {
        install: {
          options: {
            install: true,
            copy: false
          }
        }
      },
  
      jade: {
        compile: {
          options: {
            data: {
              debug: false
            }
          },
          files: {
            "build/html/index.html": ["src/jade/index.jade"],
            "build/html/login.html": ["src/jade/login.jade"]
          }
        }
      },
  
      stylus: {
        compile: {
          options: {
            urlfunc: 'embedurl'
          },
          files: {
            'build/css/site.css': ['src/stylus/site.styl']
          }
        }
      },
  
      uglify: {
        options: {
          mangle: false,
          banner: '/*! &lt;%= pkg.name %&gt; &lt;%= grunt.template.today("dd-mm-yyyy") %&gt; */\n'
        },
        dist: {
          files: {
            'build/js/&lt;%= pkg.name %&gt;.min.js': ['public/javascripts/**/*.js',
              'bower_components/angulartics/src/angulartics.js',
              'bower_components/angulartics/src/angulartics-google-analytics.js']
          }
        }
      },
  
      compress: {
        main: {
          options: {
            archive: "&lt;%= pkg.name %&gt;-&lt;%= grunt.config.get('git-revision') %&gt;.zip",
            mode: 'zip',
            pretty: true
          },
          files: [
            {expand: true, cwd: 'build/', src: ['**/*']}
          ]
        }
      }
    });
  
  
    grunt.loadNpmTasks('grunt-bower-task');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-jade');
    grunt.loadNpmTasks('grunt-contrib-stylus');
    grunt.loadNpmTasks('grunt-contrib-compress');
    grunt.loadNpmTasks('grunt-git-rev-parse');
  
  
    grunt.registerTask('test',  ['jshint']);
    grunt.registerTask('build', ['bower', 'jade', 'stylus', 'uglify']);
    grunt.registerTask('pkg', ['git-rev-parse', 'compress:main']);
  };
  </code></pre>