From ec482796a9c35eb613ebf6b61136b6f154655a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Fri, 26 May 2017 13:05:36 +0100 Subject: [PATCH] chore: have local and remote tag name the same --- scripts/publish | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/publish b/scripts/publish index f4aa67f7..6fc7f2ee 100755 --- a/scripts/publish +++ b/scripts/publish @@ -15,6 +15,10 @@ const incs = { patch: argv.dev }; +const type = ['production', 'staging', 'dev'] + .filter(k => argv[k]) + .reduce((t, name) => name, ''); + const exec = (...args) => { const cp = execa(...args); @@ -114,10 +118,6 @@ const tasks = new Listr( { title: 'Tag', task: async () => { - const type = ['production', 'staging', 'dev'] - .filter(k => argv[k]) - .reduce((t, name) => name, ''); - const lastTag = await execa.stdout('git', [ 'describe', '--tags', @@ -147,7 +147,8 @@ const tasks = new Listr( }, { title: 'Push', - task: () => exec('git', ['push', 'origin', `${pkg.name}@${pkg.version}`]) + task: () => + exec('git', ['push', 'origin', `${pkg.name}-${type}@${pkg.version}`]) } ], {