make some enchancements for publishing scripts

pull/8345/head
mehmet-erim 5 years ago
parent af1d96ce56
commit fc6cbe7068

2464
npm/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -5,6 +5,7 @@ const { program } = require('commander');
program.version('0.0.1');
program.option('-r, --rc', 'whether version is rc');
program.option('-rg, --registry <registry>', 'target npm server registry')
program.parse(process.argv);
const packages = (process.argv[3] || 'abp').split(',').join('|');
@ -14,8 +15,8 @@ const check = (pkgJsonPath) => {
return childProcess
.execSync(
`ncu "/^@(${packages}).*$/" --packageFile ${pkgJsonPath} -u${
program.rc ? ' --greatest' : ''
}`
program.rc ? ' --target greatest' : ''
}${program.registry ? ` --registry ${program.registry}` : ''}`
)
.toString();
} catch (error) {

@ -11,7 +11,7 @@
"@types/fs-extra": "^8.0.1",
"glob": "^7.1.5",
"lerna": "^3.18.4",
"npm-check-updates": "^3.1.25"
"npm-check-updates": "^11.3.0"
},
"dependencies": {
"commander": "^6.0.0",

@ -4,6 +4,7 @@ const fse = require('fs-extra');
program.version('0.0.1');
program.option('-n, --nextVersion', 'version in common.props');
program.option('-r, --rc', 'whether version is rc');
program.option('-cv, --customVersion <customVersion>', 'set exact version');
program.parse(process.argv);
@ -12,6 +13,7 @@ if (program.nextVersion) console.log(getVersion());
if (program.rc) console.log(getVersion().includes('rc'));
function getVersion() {
if (program.customVersion) return program.customVersion;
const commonProps = fse.readFileSync('../common.props').toString();
const versionTag = '<Version>';
const versionEndTag = '</Version>';

@ -19,9 +19,11 @@ if (-Not $Registry) {
$NgPacksPublishCommand = "npm run publish-packages -- --nextVersion $Version --skipGit --registry $Registry"
$PacksPublishCommand = "npm run lerna -- exec 'npm publish --registry $Registry'"
$UpdateGulpCommand = "npm run update-gulp"
$UpdateNgPacksCommand = "yarn update"
$UpdateNgPacksCommand = "yarn update --registry $Registry"
$IsRc = $(node publish-utils.js --rc --customVersion $Version) -eq "true";
$IsRc = $(node publish-utils.js --rc) -eq "true";
if ($IsRc) {
$NgPacksPublishCommand += " --rc"

Loading…
Cancel
Save