tagged-git-commits
Get the commit hash and refs/tags of tagged commits, remote and local
Installation
$ npm i tagged-git-commits --save
or
$ yarn add tagged-git-commits
Usage
const taggedCommits = ; // the latest local tagged commit from process.cwd(); // the latest local tagged commit from the repo './path/to/repo'; // the latest 5 local tagged commits from process.cwd(); // the latest tagged commit from process.cwd() from remote origin; // the latest tagged commit from process.cwd() from remote anotherOrigin; // the latest 3 tagged commits from the repo './path/to/repo' from the remote origin;
Returns an Array with objects.
commit: '31107b9051efe17e57c583937e027993860b11a9' shortCommit: '31107b9' hash: '31107b9051efe17e57c583937e027993860b11a9' shortHash: '31107b9' version: 'v1.0.0' refsTags: 'refs/tags/v1.0.0'
LICENSE
MIT © Lukas Aichbauer