Socket
Book a DemoInstallSign in
Socket

git-latest-tag

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-latest-tag

Get the most recent git tag of your repository using git-describe(1)

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

NPM version Build Status Dependency Status

Get the most recent git tag of your repository using git-describe(1)

Install

$ npm install --save git-latest-tag

Usage

Use a callback

var getLatestTag = require('git-latest-tag');
var options = {
  all: 'ok',
  contains: true,
  candidates: 10,
  'commit-ish': 'HEAD'
};

getLatestTag(options, function(err, tag) {
  console.log(tag);
  //=> latestTag
});

Use as a readable stream

var getLatestTag = require('git-latest-tag');
var options = {
  all: 'ok',
  contains: true,
  candidates: 10,
  'commit-ish': 'HEAD'
};

getLatestTag(options)
  .pipe(...);

API

getLatestTag([options], callback)

Returns a readable stream.

Options

Type: object or boolean

Options will be dash-cased for you.

Please check the available options at http://git-scm.com/docs/git-describe.

NOTE: if a flag takes no value and the passed options.value is truthy, it will generate the flag only without any value. If it's falsy the flag will not be included.

If it's a true, it will suppress long format, only showing the closest tag in refs/tags namespace and will return an empty string if there is no tags but more than one commit (same as { tags: true, abbrev: 0 }).

callback(err, tag)

License

MIT © Steve Mao

Keywords

git-latest-tag

FAQs

Package last updated on 24 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts