Code Monkey home page Code Monkey logo

git-tags-remote's Introduction

git-tags-remote

GitHub issues Build Status dependencies Status

Get remote repository tags.

Inspired by remote-git-tags and node-git-tags. Allows any type of remote repository, including repositories accessed through SSH or private repositories. If git ls-remote --tags works for you, so will this.

Install

$ npm install --save git-tags-remote

Note that a git binary and command line interface is a prerequisite.

Usage

const gitTagsRemote = require('git-tags-remote');

gitTagsRemote.get('[email protected]:sh0ji/focus-rover.git')
    .then(tags => console.log(tags));
// => Map {'v1.0.0-rc.2' => '8e048a0fd9cb668366eef550be445ac761efd667', ...}

API

.get(gitUrl)
Returns a Promise<Map> with the Git tags as keys and their commit SHA as values, just like remote-git-tags.

  • gitUrl must be a valid git url.
    e.g. 'https://github.com/sh0ji/git-tags-remote.git' is valid but 'github.com/sh0ji/git-tags-remote' is not.

.latest(gitUrl)
Returns a Promise<Array> with the latest git tag and commit SHA value.
e.g. ['v1.0.0-rc.2', '8e048a0fd9cb668366eef550be445ac761efd667']

git-tags-remote's People

Contributors

sh0ji avatar jamieslome avatar mik317 avatar

Watchers

James Cloos avatar  avatar

Forkers

mik317

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.