Skip to content

Commit

Permalink
build: Specify commits for Gaia and Voyager.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Braun authored and David Braun committed Mar 23, 2018
1 parent c9cfb5f commit bb6e456
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- node_modules
key: v1-dependencies-root-{{ checksum "package.json" }}

- run:
- run:
name: Add Gaia
command: |
sudo wget https://www.dropbox.com/s/vkyuut8hnzse614/gaia-0.5.0-linux-32?dl=1 -O ~/repo/gaia
sudo wget https://tendermint-packages.interblock.io/binaries/gaia_linux_amd64/gaia_decb23bed0179244e4f42d697dcd4bf759200a2d -O ~/repo/gaia
sudo chmod o+wx /home/circleci/repo/gaia
- run: yarn run test
- run: bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,30 @@ $ COSMOS_NODE=localhost yarn testnet
### Production

Building requires that [Docker](https://www.docker.com/get-docker) is installed
on your system. The build is made from code in the commit at `HEAD`, not from the files in the working tree.
on your system.

Build and run the app.
Build the app:

The first argument is a Git commit hash for a pre-built Gaia binary (e.g.,
`decb23bed0179244e4f42d697dcd4bf759200a2d` for `v0.5.0`).

The second argument is a commit for Voyager and can be any kind of reference
(e.g., the tag `0.4.3`).

Optional arguments (such as `--platform`) must follow the first two arguments.

```bash
yarn run build decb23bed0179244e4f42d697dcd4bf759200a2d 0.4.3 --platform={darwin|win32|linux}
```

Run the app.
```bash
yarn run build --platform={darwin|win32|linux}
open builds/Cosmos-{platform}-x64/Cosmos.app
```

When you are testing the build system you can skip the repackaging of the JS files.
```bash
$ yarn run build --platform=darwin --skip-pack
$ yarn run build decb23bed0179244e4f42d697dcd4bf759200a2d 0.4.3 --platform=darwin --skip-pack
```

To test if your build worked run:
Expand Down
15 changes: 3 additions & 12 deletions tasks/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,9 @@ FROM node:9.4.0
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get --yes install \
wine \
wine32 \
libwine

# Download Gaia.

RUN wget --output-document=/usr/local/bin/gaia \
https://tendermint-packages.interblock.io/binaries/gaia_linux_amd64/gaia_decb23bed0179244e4f42d697dcd4bf759200a2d

RUN echo "9f6e79e52d809a4321440f09890e94bad6843de685d50b9b41b5246421918cb5 */usr/local/bin/gaia" \
| sha256sum --check -

wine \
wine32 \
libwine

COPY entrypoint.sh /
RUN mkdir -p /usr/src/app
Expand Down
11 changes: 11 additions & 0 deletions tasks/build/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/sh
set -o errexit

# Download Gaia. We're trusting HTTPS and Interblock here. :-/
wget --output-document=/usr/local/bin/gaia \
https://tendermint-packages.interblock.io/binaries/gaia_linux_amd64/gaia_$1

git clone /.git .
git checkout $2

# Remove the commits before passing the arguments along to release.js.
shift 2

ln --symbolic /builds
yarn
node tasks/release.js --binary=/usr/local/bin/gaia "$@"

0 comments on commit bb6e456

Please sign in to comment.