Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

latest-git-tag

0.2.0 • Public • Published

latest-git-tag

get the latest git tag

install

$ npm install latest-git-tag

usage

cli

$ latest-git-tag
# vX.X.X 
 
$ latest-git-tag --strip
# X.X.X 

node

const latestTag = require('latest-git-tag');
 
latestTag().then(tag => {
  console.log(tag); // vX.X.X
}
 
latestTag({ strip: true }).then(tag => {
  console.log(tag); // X.X.X
}

api

latestGitTag([options])

Get the latest git tag. Pass options.

options

strip

Type: boolean

Default: false

Strip out the leading v from the tag.

always

Type: boolean

Default: false

Failsafe if no tag can be described

license

mit @ kasper lewau

install

npm i latest-git-tag

Downloadsweekly downloads

4

version

0.2.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar