feat: create annotated tags

This commit is contained in:
Pierre Vanduynslager
2019-06-07 16:03:30 -04:00
parent 9948a74347
commit 4d581fc140
5 changed files with 18 additions and 11 deletions
+1 -1
View File
@@ -195,7 +195,7 @@ export function gitTagHead(tagName, execaOpts) {
* @return {String} The sha of the commit associated with `tagName` on the remote repository.
*/
export async function gitRemoteTagHead(repositoryUrl, tagName, execaOpts) {
return (await execa.stdout('git', ['ls-remote', '--tags', repositoryUrl, tagName], execaOpts))
return (await execa.stdout('git', ['ls-remote', repositoryUrl, `${tagName}^{}`], execaOpts))
.split('\n')
.filter(tag => Boolean(tag))
.map(tag => tag.match(/^(\S+)/)[1])[0];