chore: update preview-publish.ps1

pull/2986/head
mehmet-erim 6 years ago
parent 2234350a1d
commit ccc87991c7

@ -19,6 +19,8 @@ const publish = async () => {
process.exit(1);
}
const registry = program.preview ? 'http://localhost:4873' : 'https://registry.npmjs.org';
try {
await execa('yarn', ['install-new-dependencies'], { stdout: 'inherit' });
@ -44,9 +46,7 @@ const publish = async () => {
'lerna',
'exec',
'--',
`"npm publish --registry https://registry.npmjs.org${
program.preview ? ' --tag preview' : ''
}"`,
`"npm publish --registry ${registry}${program.preview ? ' --tag preview' : ''}"`,
],
{
stdout: 'inherit',
@ -56,12 +56,14 @@ const publish = async () => {
await fse.rename('../lerna.json', '../lerna.publish.json');
await execa('git', ['add', '../packages/*', '../package.json', '../lerna.version.json'], {
stdout: 'inherit',
});
await execa('git', ['commit', '-m', 'Upgrade ng package versions', '--no-verify'], {
stdout: 'inherit',
});
if (!program.preview) {
await execa('git', ['add', '../packages/*', '../package.json', '../lerna.version.json'], {
stdout: 'inherit',
});
await execa('git', ['commit', '-m', 'Upgrade ng package versions', '--no-verify'], {
stdout: 'inherit',
});
}
} catch (error) {
console.error(error.stderr);
process.exit(1);

@ -4,7 +4,7 @@ param(
npm install
$NextVersion = $(node get-version.js) + '-preview' + (Get-Date).tostring(yyyyMMdd) + '-1'
$NextVersion = $(node get-version.js) + '-preview' + (Get-Date).tostring(yyyyMMdd)
$rootFolder = (Get-Item -Path "./" -Verbose).FullName
if(-Not $Version) {
@ -16,7 +16,7 @@ $commands = (
"npm install",
"npm run publish-packages -- --nextVersion $Version --preview",
"cd ../../",
"yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish --dist-tag preview"
"yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish --dist-tag preview --registry http://localhost:4873"
)
foreach ($command in $commands) {

Loading…
Cancel
Save