grunt-gitinfo icon indicating copy to clipboard operation
grunt-gitinfo copied to clipboard

use output of custom commands in other custom commands

Open jack-kerouac opened this issue 10 years ago • 0 comments

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?

jack-kerouac avatar Nov 06 '14 09:11 jack-kerouac