publish @openpanel/react-native@0.0.10-beta

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-07-07 12:57:04 +02:00
parent 42ede249ea
commit eb69377a25
2 changed files with 11 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@openpanel/react-native", "name": "@openpanel/react-native",
"version": "0.0.9-beta", "version": "0.0.10-beta",
"module": "index.ts", "module": "index.ts",
"scripts": { "scripts": {
"build": "rm -rf dist && tsup", "build": "rm -rf dist && tsup",

View File

@@ -69,6 +69,7 @@ type IPackageJsonWithExtra = IPackageJson & {
function main() { function main() {
const args = arg({ const args = arg({
'--name': String, '--name': String,
'--publish': Boolean,
'--test': Boolean, '--test': Boolean,
'--skip-git': Boolean, '--skip-git': Boolean,
// Semver // Semver
@@ -82,6 +83,7 @@ function main() {
const pkgName = args['--name']; const pkgName = args['--name'];
const type = args['--type'] as ReleaseType; const type = args['--type'] as ReleaseType;
const test = args['--test']; const test = args['--test'];
const publish = args['--publish'];
const packages: Record<string, IPackageJsonWithExtra> = {}; const packages: Record<string, IPackageJsonWithExtra> = {};
const registry = test const registry = test
? 'http://localhost:4873' ? 'http://localhost:4873'
@@ -193,12 +195,14 @@ function main() {
}); });
// Publish // Publish
dependents.forEach((dependent) => { if (publish) {
console.log(`🚀 Publishing ${dependent} to ${registry}`); dependents.forEach((dependent) => {
execSync(`npm publish --access=public --registry ${registry}`, { console.log(`🚀 Publishing ${dependent} to ${registry}`);
cwd: workspacePath(packages[dependent]!.localPath), execSync(`npm publish --access=public --registry ${registry}`, {
cwd: workspacePath(packages[dependent]!.localPath),
});
}); });
}); }
// Restoring package.json // Restoring package.json
const filesToRestore = dependents const filesToRestore = dependents