1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-30 23:20:06 +02:00

chore: have local and remote tag name the same

This commit is contained in:
Sérgio Ramos 2017-05-26 13:05:36 +01:00
parent 6f2eb3cbb1
commit ec482796a9

View File

@ -15,6 +15,10 @@ const incs = {
patch: argv.dev patch: argv.dev
}; };
const type = ['production', 'staging', 'dev']
.filter(k => argv[k])
.reduce((t, name) => name, '');
const exec = (...args) => { const exec = (...args) => {
const cp = execa(...args); const cp = execa(...args);
@ -114,10 +118,6 @@ const tasks = new Listr(
{ {
title: 'Tag', title: 'Tag',
task: async () => { task: async () => {
const type = ['production', 'staging', 'dev']
.filter(k => argv[k])
.reduce((t, name) => name, '');
const lastTag = await execa.stdout('git', [ const lastTag = await execa.stdout('git', [
'describe', 'describe',
'--tags', '--tags',
@ -147,7 +147,8 @@ const tasks = new Listr(
}, },
{ {
title: 'Push', title: 'Push',
task: () => exec('git', ['push', 'origin', `${pkg.name}@${pkg.version}`]) task: () =>
exec('git', ['push', 'origin', `${pkg.name}-${type}@${pkg.version}`])
} }
], ],
{ {