Juan Cruz Viotti d521fbbd2c chore(CLI): minify Etcher CLI code (#1401)
UglifyJS v3 was recently released, which includes support for
compressing ES6 code.

This commit introduces the following changes:

- Add a boolean `-m` option to `concatenate-javascript.sh`, which when
  set, will minify the final concatenated JavaScript file

- Install `uglify-es` in the CI servers

See: https://news.ycombinator.com/item?id=14285179
See: https://github.com/mishoo/UglifyJS2/tree/harmony
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-05-10 15:15:41 -04:00
..

Compile Etcher in Docker

This is directory provides the utilities necessary to be able to run GNU/Linux Etcher (headlessly), compile it, and package it, inside Docker containers.

This directory provides a set of Dockerfiles for each supported architecture that are compiled from a base Dockerfile template. The Dockerfiles install every needed dependency to be able to build and package Etcher for GNU/Linux targets.

Running a command inside the Docker images

We provide a utility script called run-command.sh which allows you to run a command in an environment where you have all the dependencies needed to build and package Etcher, and in where the Etcher source code is available in the current working directory.

For example:

./run-command.sh \
  -r x64 \
  -s path/to/etcher/repository \
  -c "make info" \
  -b "a/temporary/directory/for/docker/build"

The above command will build the corresponding Docker file (if needed), and will run the command on it.

Architecture dependent Dockerfile steps

You can declare certain steps to be run for certain architectures by using the following logic:

<% if (architecture == 'i686') { %>
  ...
<% } %>

<% if (architecture == 'x86_64') { %>
  ...
<% } %>

Compiling the Dockerfile.template

If you modify the Dockerfile.template file, you will need to regenerate the compiled Dockerfiles by running the compile-template.js utility script:

node compile-template.js