Giter Site home page Giter Site logo

grunt-gitinfo's People

Contributors

coreyjewett avatar damkraw avatar drasive avatar madarche avatar nerdgore avatar tomgault avatar zorgleh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

grunt-gitinfo's Issues

Tag Releases in git

Tagging releases in git makes it much easier to figure out what version you're on, I highly recommend tagging releases as you bump your npm version number.

Remove leading and trailing quotes from results

Some of the commands return a response with added leading and a trailing quotes, event though the original result didn't contain them:
output

It would be nice to have the results without the additional quotes.

use output of custom commands in other custom commands

I want to list the first line of all commits since the last tag starting with release-. On the command line, the command would be:
git log --oneline $(git describe --tags --match="release-*" --abbrev=0)..HEAD

How can this be achieved with gitinfo?

gitinfo: {
    commands: {
        'release.last.tag': ['describe', '--tags', '--match=release-*', '--abbrev=0'],
        'log.since.last.release': ['log', '--oneline', '<%= grunt.config.get("gitinfo.release.last.tag") %>..HEAD']
    }
}

I tried something like that, but since gitinfo performs custom commands asynchronously, I does not work.

Any ideas?

lodash version is outdated

there is new security issue for lodash below 4.17.11. everytime i run audit, it always give me security vulnerability for lodash in grunt-gitinfo package

Getting error with new version (0.1.2)

With the newest version bump to 0.1.2 I am receiving this error when running grunt gitinfo

Warning: Cannot read property 'options' of undefined Use --force to continue.

Can't use git-info after 'git gc'

Cannot read the commit SHA of the current HEAD from the /home/ubuntu/gitrepo/.git/refs/heads/master.

Seems like git gc is emptying the refs/heads dir and gitinfo fails to get the commit sha

If you don't have any tags an error is shown

For instance:

$ grunt gitinfo
Running "gitinfo" task
[gitinfo]: couldn't set config: local.branch.current.tag

I think having no tags is a valid state and should just return null for the local.branch.current.tag property.

git formatted output with quotes

First of all, thank you for your work.

The output of all the commands with --format option (lastCommitTime, lastCommitMessage, lastCommitAuthor) is surrounded with double quotes.
Is there any specific reason? I mean, the format option in git doesn't need double quotes, and it is giving me some troubles using it with preprocess/usemin while putting in an html attribute.

If I can suggest a change, it would simply be to remove double quotes from the option

'local.branch.current.lastCommitTime' : ['log', '--format=%ai', '-n1', 'HEAD'], 'local.branch.current.lastCommitMessage' : ['log', '--format=%B', '-n1', 'HEAD'], 'local.branch.current.lastCommitAuthor' : ['log', '--format=%aN', '-n1', 'HEAD'],

If you agree I can submit a PR.

Cheers

git object remains empty

I want to create grunt task that is going to write git information to file. However, I am not getting any git information. I followed instructions but cannot figure out what I am doing wrong. Inside my grunt file I have following:

grunt.loadNpmTasks('grunt-gitinfo');

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
gitinfo: {},
....
})

....
grunt.registerTask('gitVersion', [
'gitinfo'
]);

grunt.registerTask('version', 'Creates an empty file', function() {
var git = grunt.config().gitinfo;
var pjson = require('./package.json');

    console.log(pjson.version);

    grunt.file.write('VERSION.txt', "Version: " + pjson.version + "\r\n" + git);

});

After running the task new file is created and psjon.version is written but git object remains empty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.