Revision 0.34.42
This commit is contained in:
16
hammer.mjs
16
hammer.mjs
@@ -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`)
|
||||
}
|
||||
Reference in New Issue
Block a user