/* eslint-disable no-console, max-len */
'use strict';

const shell = require('shelljs');
const exec = shell.exec;
const clc = require('cli-color');

console.log(clc.blue('build stuff ...'));
exec('npm run build_prod');

// console.log(clc.blue('gzip stuff ...'));
// exec('gzip build/main.js');
// exec('mv build/main.js.gz build/main.js');

console.log(clc.blue('s3cmd put stuff ...'));
const headers = "--mime-type='application/javascript'"; //--add-header='Content-Encoding':'gzip'";

exec('s3cmd put -P build/iframe.html s3://iframe-stage.chatid.com/');
exec(`s3cmd put -P ${headers} build/main.js s3://iframe-stage.chatid.com/`);

@@ -214,19 +214,16 @@
 rod');%0A%0A
-// 
 console.
@@ -255,19 +255,16 @@
 ...'));%0A
-// 
 exec('gz
@@ -287,11 +287,8 @@
 ');%0A
-// 
 exec
@@ -377,207 +377,213 @@
 ));%0A
-const headers = %22--mime-type='application/javascript'%22; //--add-header='Content-Encoding':'gzip'%22;%0A%0Aexec('s3cmd put -P build/iframe.html s3://iframe-stage.chatid.com/');%0Aexec(%60s3cmd put -P $%7Bheaders%7D
+exec('aws s3 cp --acl public-read --content-type text/html build/iframe.html s3://iframe-stage.chatid.com/');%0Aexec('aws s3 cp --acl public-read --content-type application/javascript --content-encoding gzip
  bui
@@ -626,8 +626,8 @@
 com/
-%60
+'
 );%0A

Remove dependency on s3cmd in favor of aws cli in demo.js