mirror of
https://github.com/zhigang1992/tipsi-stripe.git
synced 2026-06-11 16:50:00 +08:00
16 lines
483 B
JavaScript
Executable File
16 lines
483 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
const path = require('path')
|
|
const { execSync } = require('child_process')
|
|
const { name, version } = require('../../package.json')
|
|
|
|
const rootDirectory = path.join(__dirname, '../..')
|
|
|
|
// 1. Remove all *.tgz before install
|
|
execSync('rm -rf *.tgz', { cwd: rootDirectory })
|
|
|
|
// 2. Do npm pack
|
|
execSync('npm pack', { cwd: rootDirectory })
|
|
|
|
// 3. Rename .tgz to tipsi-stripe-latest.tgz
|
|
execSync(`mv ${name}-${version}.tgz ${name}-latest.tgz`, { cwd: rootDirectory })
|