+5
-9
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user