Skip to content

Commit

Permalink
perf: pkg version
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Apr 17, 2024
1 parent d0ad956 commit 5588ee0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/updateVersion.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import fs from 'node:fs/promises';
import type selfPkgT from '../package.json';
import process from 'node:process';

const selfPkg: typeof selfPkgT = JSON.parse(
await fs.readFile(process.cwd() + '/package.json', 'utf-8'),
);

selfPkg.version = `0.0.` + Date.now();
selfPkg.version =
selfPkg.version.split('.').slice(0, 2).join('.') + '.' + Date.now();

await fs.writeFile(
process.cwd() + '/package.json',
Expand Down

0 comments on commit 5588ee0

Please sign in to comment.