Files
redocly-cli/scripts/archive-and-upload-bundle.js
Sergey Dubovyk 81ade196d2 feat: add bundling opportunity (#177)
* 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
2020-08-13 13:51:12 +03:00

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}`);