Skip to content

Commit

Permalink
[ci] run canary publish second time without actual publishing to npm
Browse files Browse the repository at this point in the history
Otherwise lerna resets package.json files and publish check is done against previous versions.

Signed-off-by: Anton Kosyakov <[email protected]>
  • Loading branch information
akosyakov committed Jan 22, 2019
1 parent 9f6179b commit 92c64f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"command": {
"run": {
"stream": true
},
"publish": {
"forcePublish": true,
"skipGit": true,
"registry": "https://registry.npmjs.org/"
}
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@
"rebuild:electron:debug": "DEBUG=electron-rebuild && yarn rebuild:electron",
"watch": "lerna run watch --scope \"@theia/!(example-)*\" --parallel",
"publish": "yarn && yarn test && yarn publish:latest",
"publish:latest": "lerna publish --registry=https://registry.npmjs.org/ --skip-git --force-publish && yarn publish:check",
"publish:next": "lerna publish --registry=https://registry.npmjs.org/ --exact --canary=next --npm-tag=next --force-publish --skip-git --yes && yarn publish:check",
"publish:latest": "lerna publish && yarn publish:check",
"publish:next": "yarn next:publish && yarn next:publish --skip-npm && yarn publish:check",
"next:publish": "lerna publish --exact --canary=next --npm-tag=next --yes",
"publish:check": "node scripts/check-publish.js"
},
"workspaces": [
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ for (const name in workspaces) {
if (cp.execSync(`npm view ${pckName} version --json`).toString().trim()) {
console.info(`${pckName}: published`);
} else {
console.error(`${pckName}: ${chalk.red('NOT')} published`);
console.error(`(${chalk.red('ERR')}) ${pckName}: ${chalk.red('NOT')} published`);
code = 1;
}
}
Expand Down

0 comments on commit 92c64f9

Please sign in to comment.