fix publish script

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-11-04 13:48:06 +01:00
parent 3c7c47c5b1
commit fe6f4a8f39

View File

@@ -17,6 +17,7 @@ function exit(message: string, error?: unknown) {
console.log(`${message}`); console.log(`${message}`);
if (error instanceof Error) { if (error instanceof Error) {
console.log(`Error: ${error.message}`); console.log(`Error: ${error.message}`);
console.log(error);
} else if (typeof error === 'string') { } else if (typeof error === 'string') {
console.log(`Error: ${error}`); console.log(`Error: ${error}`);
} }
@@ -82,11 +83,11 @@ function main() {
try { try {
execSync('npm publish --access=public', { execSync('npm publish --access=public', {
cwd: './packages/sdk', cwd: workspacePath('./packages/sdk'),
}); });
execSync('npm publish --access=public', { execSync('npm publish --access=public', {
cwd: './packages/types', cwd: workspacePath('./packages/types'),
}); });
} catch (error) { } catch (error) {
exit('Failed publish packages', error); exit('Failed publish packages', error);