Skip to content

Commit 649d492

Browse files
committed
fix: Update version script
1 parent 23a4f34 commit 649d492

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.releaserc.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"branches": [
33
{
4-
"name": "main"
5-
},
6-
{ "name": "rc_*", "channel": "next", "type": "prerelease" }
4+
"name": "main",
5+
"prerelease": "rc"
6+
}
77
],
88
"plugins": [
99
"@semantic-release/commit-analyzer",

update-version.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import fs from 'fs';
2+
import path from 'path';
3+
import { fileURLToPath } from 'url';
4+
5+
// Convert import.meta.url to a file path
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
9+
const versionFilePath = path.resolve(__dirname, 'src/version.ts');
10+
const newVersion = process.argv[2];
11+
12+
fs.writeFileSync(versionFilePath, `export const VERSION = '${newVersion}';\n`, 'utf8');

update-version.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)