refactor: review comments

This commit is contained in:
Pranav C
2024-10-06 07:21:34 +00:00
parent 8f04bd8781
commit 58ea2db4b9
16 changed files with 66 additions and 47 deletions

View File

@@ -4,5 +4,11 @@ const path = require('path')
const packageJsonPath =path.join(__dirname, '..', 'packages', 'nc-secret-cli', 'package.json')
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (!process.env.targetVersion) {
console.error('Error: targetVersion environment variable is not defined.');
process.exit(1);
}
packageJson.version = process.env.targetVersion
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, 0, 2))
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))