2022-07-06 15:20:52 +05:30
|
|
|
const { execSync } = require("child_process");
|
2021-07-05 22:29:35 +05:30
|
|
|
|
|
|
|
const excalidrawDir = `${__dirname}/../src/packages/excalidraw`;
|
|
|
|
const excalidrawPackage = `${excalidrawDir}/package.json`;
|
2022-07-06 15:20:52 +05:30
|
|
|
const pkg = require(excalidrawPackage);
|
|
|
|
|
|
|
|
const publish = () => {
|
2021-07-05 22:29:35 +05:30
|
|
|
try {
|
2022-07-06 15:20:52 +05:30
|
|
|
execSync(`yarn --frozen-lockfile`);
|
|
|
|
execSync(`yarn --frozen-lockfile`, { cwd: excalidrawDir });
|
|
|
|
execSync(`yarn run build:umd`, { cwd: excalidrawDir });
|
|
|
|
execSync(`yarn --cwd ${excalidrawDir} publish`);
|
2021-11-02 14:24:16 +02:00
|
|
|
} catch (error) {
|
|
|
|
console.error(error);
|
2021-07-05 22:29:35 +05:30
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-07-06 15:20:52 +05:30
|
|
|
const release = () => {
|
|
|
|
publish();
|
|
|
|
console.info(`Published ${pkg.version}!`);
|
|
|
|
};
|
|
|
|
|
|
|
|
release();
|