From 551340f2d10120440c0e76b56dfef1151b1018dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bazyli=20Brz=C3=B3ska?= Date: Sun, 20 Nov 2016 16:26:48 +0100 Subject: [PATCH 1/4] feat: make tagPrefix configurable --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a619c9ccb..906d2e7b6 100755 --- a/index.js +++ b/index.js @@ -203,7 +203,7 @@ function tag (newVersion, pkgPrivate, argv, cb) { tagOption = '-a ' } checkpoint(argv, 'tagging release %s', [newVersion]) - handledExec(argv, 'git tag ' + tagOption + 'v' + newVersion + ' -m "' + formatCommitMessage(argv.message, newVersion) + '"', cb, function () { + handledExec(argv, 'git tag ' + tagOption + argv.tagPrefix + newVersion + ' -m "' + formatCommitMessage(argv.message, newVersion) + '"', cb, function () { var message = 'git push --follow-tags origin master' if (pkgPrivate !== true) message += '; npm publish' From 8a1993d451934b8d36668a2673f19ad50317e2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bazyli=20Brz=C3=B3ska?= Date: Sun, 20 Nov 2016 16:27:49 +0100 Subject: [PATCH 2/4] chore: add default tagPrefix --- defaults.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults.json b/defaults.json index bb0c6f416..26ef43c73 100644 --- a/defaults.json +++ b/defaults.json @@ -5,5 +5,6 @@ "sign": false, "noVerify": false, "commitAll": false, - "silent": false + "silent": false, + "tagPrefix": "v" } From b495567bcaa0ba8cc1e84e7f74961c473dd9b7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bazyli=20Brz=C3=B3ska?= Date: Sun, 20 Nov 2016 16:31:32 +0100 Subject: [PATCH 3/4] feat: update CLI with the tag-prefix option --- command.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/command.js b/command.js index e6fcdd443..15ced7563 100755 --- a/command.js +++ b/command.js @@ -63,6 +63,13 @@ module.exports = require('yargs') default: defaults.silent, global: true }) + .option('tag-prefix', { + alias: 't', + describe: 'Set a custom prefix for the git tag to be created', + type: 'boolean', + default: defaults.tagPrefix, + global: true + }) .version() .alias('version', 'v') .help() From 2925833281fbf4ffca5005171230092a9480928b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bazyli=20Brz=C3=B3ska?= Date: Sun, 27 Nov 2016 00:56:18 +0100 Subject: [PATCH 4/4] fix: correct type of tag-prefix --- command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.js b/command.js index 15ced7563..83242af41 100755 --- a/command.js +++ b/command.js @@ -66,7 +66,7 @@ module.exports = require('yargs') .option('tag-prefix', { alias: 't', describe: 'Set a custom prefix for the git tag to be created', - type: 'boolean', + type: 'string', default: defaults.tagPrefix, global: true })