Revision 0.34.42

This commit is contained in:
sinclair
2025-12-24 16:10:15 +09:00
parent 13d553220c
commit 866caf02f0
6 changed files with 73 additions and 37 deletions

View File

@@ -110,19 +110,9 @@ export async function install_local() {
// -------------------------------------------------------------
// Publish
// -------------------------------------------------------------
export async function publish(otp, target = 'target/build') {
const { version } = JSON.parse(Fs.readFileSync('package.json', 'utf8'))
if(version.includes('-dev')) throw Error(`package version should not include -dev specifier`)
await shell(`cd ${target} && npm publish sinclair-typebox-${version}.tgz --access=public --otp ${otp}`)
export async function publish(target = 'target/build') {
const { name, version } = JSON.parse(Fs.readFileSync(`${target}/package.json`, 'utf8'))
console.log('publishing ... ', { name, version })
await shell(`git tag ${version}`)
await shell(`git push origin ${version}`)
}
// -------------------------------------------------------------
// Publish-Dev
// -------------------------------------------------------------
export async function publish_dev(otp, target = 'target/build') {
const { version } = JSON.parse(Fs.readFileSync(`${target}/package.json`, 'utf8'))
if(!version.includes('-dev')) throw Error(`development package version should include -dev specifier`)
await shell(`cd ${target} && npm publish sinclair-typebox-${version}.tgz --access=public --otp ${otp} --tag dev`)
}