Skip to content

Commit

Permalink
fix(before-publish): rename TAG to tag
Browse files Browse the repository at this point in the history
  • Loading branch information
miniben-90 committed Nov 20, 2024
1 parent 56f0972 commit cd95597
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .scripts/before-publish.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require('node:path');
const fs = require('node:fs');
const { argv } = require('node:process');

const { TAG } = process.env;

Expand All @@ -9,8 +8,8 @@ function raplceCargoVersion(cargoToml, version) {
}

if (TAG && TAG.startsWith('napi-')) {
const TAG = TAG.replace('napi-', '');
const version = TAG.startsWith('v') ? TAG.substring(1) : TAG;
const tag = TAG.replace('napi-', '');
const version = tag.startsWith('v') ? tag.substring(1) : tag;
console.log('[BEFORE-PUBLISH]', 'Update package.json and cargo.toml version to', version);

const packageJsonPath = path.join(process.cwd(), 'package.json');
Expand Down

0 comments on commit cd95597

Please sign in to comment.