Skip to content

Commit

Permalink
Only tag releases from master (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki authored and yuriy-fix committed Feb 27, 2019
1 parent 353a3e4 commit 43c3631
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions bin/magi-release
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,16 @@ async function main(version) {
done('Converted to Polymer 3')

info('Publishing to npm');
const next = /(alpha|beta|pre|rc)[.]*[0-9]+$/;
const tag = next.test(newVersion) ? 'next' : 'latest';
await exe(`npm publish --access public --tag ${tag}`);
done(`Deployed to npm: ${npmUrl} with tag ${tag}`);
if (branch === 'master') {
const next = /(alpha|beta|pre|rc)[.]*[0-9]+$/;
const tag = next.test(newVersion) ? 'next' : 'latest';
await exe(`npm publish --access public --tag ${tag}`);
done(`Deployed to npm: ${npmUrl} with tag ${tag}`);
} else {
// Backported patch releases
await exe(`npm publish --access public`);
done(`Deployed to npm: ${npmUrl}`);
}

info('Reverting P3 back to P2');
await exe('git reset --hard HEAD^', true);
Expand Down

0 comments on commit 43c3631

Please sign in to comment.