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",
"version": "0.0.9-beta",
"version": "0.0.10-beta",
"module": "index.ts",
"scripts": {
"build": "rm -rf dist && tsup",
@@ -32,4 +32,4 @@
]
},
"prettier": "@openpanel/prettier-config"
}
}

View File

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