chore: moved to a new branch to save space

This commit is contained in:
Haoyu Xu
2023-03-16 21:49:29 -04:00
commit 6ef70824a1
116 changed files with 23521 additions and 0 deletions

15
libs/version.js Normal file
View File

@@ -0,0 +1,15 @@
import path from 'path'
import { readSync, writeSync } from './file.js'
export function read (dir) {
return readSync(path.join(dir, 'Version'))
}
export function increase(dir) {
// release version will be lagged by 0.0.1
const version = read(dir)
const [major, minor, patch] = version.split('.')
const newVersion = `${major}.${minor}.${+patch + 1}`
writeSync(newVersion, path.join(dir, 'Version'))
return newVersion
}