Skip to content

Commit

Permalink
refactor(plugins): use gnu sed utility than node changing
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Feb 20, 2024
1 parent 326e0b1 commit 10f5260
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions plugins/npm_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@ release() {
log_verbose "New version: $RELEASE_VERSION!"

if ! $IS_DRY_RUN; then
node -e "
const fs = require('fs/promises');
const pkg = require('./package.json');
fs.writeFile('./package.json', JSON.stringify({
...pkg,
version: '$RELEASE_VERSION'.substr(1)
}, null, 2))
"
sed -i '' "s/\"version\": \"[^\"]*\",/\"version\": \"$BUILD_VERSION\",/" package.json

echo "Updated package.json version!"
else
Expand Down

0 comments on commit 10f5260

Please sign in to comment.