Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Commit

Permalink
fix(publishing): push single tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Orlov committed Mar 1, 2020
1 parent af17806 commit c42aef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/middleware/publish-tag-if-required.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function publishTagIfRequired({ intermediate }: SemanticsCtx) {
let branch = execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8' });
if (/HEAD/.test('HEAD')) {
branch = execSync('git name-rev HEAD', { encoding: 'utf8' }).replace(/HEAD\s+/, '');
Log.info(`The HEAD is detached. Current branch is ${branch}`);
Log.info(`The HEAD is detached. Current branch is ${branch}.`);
}

if (!origin.includes('@')) {
Expand Down Expand Up @@ -54,7 +54,7 @@ export function publishTagIfRequired({ intermediate }: SemanticsCtx) {
// execSync(`git commit -m "docs(changelog): add ${intermediate.newVersion} changes"`);
// }

return execPromise(`git push --follow-tags`);
return execPromise(`git push origin ${intermediate.newVersion}`);
})
.catch(Log.error)
.then(() => Log.success(`Version ${Iro.bold(Iro.green(intermediate.newVersion))} successfully released! 🙌`))
Expand Down

0 comments on commit c42aef2

Please sign in to comment.