Sha256: ecaf13b6e1cd099d96a0efeb320c46890042652e2b3b245c2001d960325c9062

Contents?: true

Size: 706 Bytes

Versions: 25

Compression:

Stored size: 706 Bytes

Contents

'use strict';
const {promisify} = require('util');
const childProcess = require('child_process');

const execFile = promisify(childProcess.execFile);

module.exports = async repoUrl => {
	const {stdout} = await execFile('git', ['ls-remote', '--tags', repoUrl]);
	const tags = new Map();

	for (const line of stdout.trim().split('\n')) {
		const [hash, tagReference] = line.split('\t');

		// Strip off the indicator of dereferenced tags so we can override the
		// previous entry which points at the tag hash and not the commit hash
		// `refs/tags/v9.6.0^{}` → `v9.6.0`
		const tagName = tagReference.replace(/^refs\/tags\//, '').replace(/\^\{\}$/, '');

		tags.set(tagName, hash);
	}

	return tags;
};

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.51 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.50 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.49 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.48 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.47 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.46 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.45 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.44 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.43 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.42 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.41 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.40 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.39 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.38 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.32 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.31 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.30 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.29 node_modules/remote-git-tags/index.js
immosquare-cleaner-0.1.28 node_modules/remote-git-tags/index.js