1 | #!/usr/bin/env node
|
2 |
|
3 | const process = require('process')
|
4 | const childProcess = require('child_process')
|
5 | const pkg = require('../package.json')
|
6 |
|
7 | const envs = ['testing', 'staging', 'production']
|
8 | const env = process.argv[2]
|
9 |
|
10 | if (envs.indexOf(env) < 0) {
|
11 | console.log(`Unsupported env '${env}'`)
|
12 | process.exit(1)
|
13 | } else {
|
14 | childProcess.execSync(
|
15 | `node ./node_modules/.bin/mobify-docs deploy docs/public/latest -p mobify-test-framework -v ${pkg.version} --env ${env}`,
|
16 | {stdio: [0, 1, 2]}
|
17 | )
|
18 | }
|