Skip to content

Commit

Permalink
post publish using tag from the package version
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Feb 3, 2021
1 parent 90ec21b commit 4d1500a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/sync_packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var glob = require('glob');
var common = require('./util/common');
var constants = require('./util/constants');
var pkg = require('../package.json');
var rc = pkg.version.split('-')[1];
var tag = rc ? (' --tag ' + rc.split('.')[0]) : '';

var year = (new Date()).getFullYear();

Expand Down Expand Up @@ -306,6 +308,6 @@ function _publishToNPM(d, pkgPath) {
cb();
return;
}
exec('npm publish', {cwd: pkgPath}, cb).stdout.pipe(process.stdout);
exec('npm publish' + tag, {cwd: pkgPath}, cb).stdout.pipe(process.stdout);
};
}

0 comments on commit 4d1500a

Please sign in to comment.