revert: feat: create annotated tags

This reverts commit 4d581fc140.
This commit is contained in:
Pierre Vanduynslager
2019-09-13 14:46:47 -04:00
parent d120eaea8b
commit 0629f3cd8a
5 changed files with 11 additions and 18 deletions
+5 -9
View File
@@ -1,9 +1,8 @@
const {matches, pick, memoize, template} = require('lodash');
const {matches, pick, memoize} = require('lodash');
const gitLogParser = require('git-log-parser');
const getStream = require('get-stream');
const execa = require('execa');
const debug = require('debug')('semantic-release:git');
const {TAG_MESSAGE_FORMAT} = require('./definitions/constants');
Object.assign(gitLogParser.fields, {hash: 'H', message: 'B', gitTags: 'd', committerDate: {key: 'ci', type: Date}});
@@ -223,17 +222,14 @@ async function verifyAuth(repositoryUrl, branch, execaOpts) {
/**
* Tag the commit head on the local repository.
*
* @param {Object} release The release associated with the tag.
* @param {String} tagName The name of the tag.
* @param {String} ref The Git reference to tag.
* @param {Object} [execaOpts] Options to pass to `execa`.
*
* @throws {Error} if the tag creation failed.
*/
async function tag(release, execaOpts) {
await execa(
'git',
['tag', release.gitTag, release.gitHead, '-a', '-m', template(TAG_MESSAGE_FORMAT)(release)],
execaOpts
);
async function tag(tagName, ref, execaOpts) {
await execa('git', ['tag', tagName, ref], execaOpts);
}
/**