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}`]) } ], {