mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
* feat: add bundling opportunity * chore: change flag name for bundle * feat: add bundle & upload commands to build * chore: ignore simple-websocket for bundle * chore: remove net module * feat: add configurable --profile for aws cli * chore: remove externals from webpack config * chore: add websocket comment * chore: rename bundle uploading script * chore: add shebang-loader * chore: null-load fsevents * chore: remove node-loader
24 lines
675 B
JavaScript
24 lines
675 B
JavaScript
const yargs = require('yargs');
|
|
|
|
const { execSync } = require('child_process');
|
|
const package = require('../package.json');
|
|
|
|
const version = package.version;
|
|
const fileName = `openapi-cli.${version}.tar.gz`;
|
|
const fileNameLatest = `openapi-cli.latest.tar.gz`;
|
|
|
|
execSync(`tar -zcvf ${fileName} dist`);
|
|
execSync(`tar -zcvf ${fileNameLatest} dist`);
|
|
|
|
|
|
const argv = yargs
|
|
.option('aws_profile', {
|
|
alias: 'p',
|
|
type: 'string',
|
|
})
|
|
.argv;
|
|
|
|
let profile = !!argv.aws_profile ? `--profile ${argv.aws_profile}` : '';
|
|
|
|
execSync(`aws s3 cp ${fileName} s3://openapi-cli-dist ${profile}`);
|
|
execSync(`aws s3 cp ${fileNameLatest} s3://openapi-cli-dist ${profile}`); |