Skip to content

Commit

Permalink
update setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Apr 22, 2024
1 parent f77f173 commit c1da605
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modelina-cli/scripts/renameModelinaPack.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@
const path = require('path');
const modelinaPkg = require(path.resolve(__dirname, '../../package.json'));
const fs = require('fs');
fs.mkdirSync(path.resolve(__dirname, './modelina-package'));
fs.renameSync(path.resolve(__dirname, `../asyncapi-modelina-${modelinaPkg.version}.tgz`), path.resolve(__dirname, `./modelina-package/asyncapi-modelina.tgz`));
const { spawnSync } = require('child_process');

const modelinaPackageDir = path.resolve(__dirname, './modelina-package');
if (!fs.existsSync(modelinaPackageDir)){
fs.mkdirSync(modelinaPackageDir);
}

fs.renameSync(path.resolve(__dirname, `../asyncapi-modelina-${modelinaPkg.version}.tgz`), path.resolve(__dirname, `./modelina-package/asyncapi-modelina.tgz`));

spawnSync(`cd ${__dirname}/../ && npm install ./scripts/modelina-package/asyncapi-modelina.tgz`)

0 comments on commit c1da605

Please sign in to comment.