Skip to content

Commit

Permalink
release 0.3.2 hotfixes (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkchv authored Nov 29, 2017
1 parent 353019d commit bc7abc8
Show file tree
Hide file tree
Showing 107 changed files with 16,683 additions and 1,429 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ coverage/
*.log
*.bac

/build
/report
build/
report/
.truffle-solidity-loader
/coverage
yarn.lock
package-lock.json
build.zip
build.zip
cert.pem
key.pem
67 changes: 43 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,52 @@
sudo: true
language: node_js

dist: trusty

node_js:
- "8.9.1"

sudo: true

git:
depth: 1

before_install:
- sudo apt-get -qq update
- sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev gcc-4.8 g++-4.8 build-essential -y
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.2.1
- export PATH="$HOME/.yarn/bin:$PATH" CXX=g++-4.8

branches:
only:
- master
- develop

jobs:
include:
- stage: build docker image
before_script:
- yarn testrpc > /dev/null &
- yarn contracts
script:
- npm config set NPM_CONFIG_LOGLEVEL error
- npm install --silent
- npm run testrpc > /dev/null &
- sleep 5 && npm run bridge > /dev/null &
- sleep 60 && npm run contracts --silent
- npm test -- --coverage
- npm run build --silent
- FULL_GCR_KEY="-----BEGIN PRIVATE KEY-----\n"$GCR_KEY"\n-----END PRIVATE KEY-----\n"
- sed -i -e "s%\PWD%$FULL_GCR_KEY%g" gcregistry.json
- sed -i -e "s%branch%$TRAVIS_BRANCH%g" Dockerfile
- cat Dockerfile
- docker login -u _json_key -p "$(cat gcregistry.json)" https://gcr.io
- rm -rf gcregistry.json
- |
if [ "$TRAVIS_TAG" == "" ]; then
IMAGE_TAG_NAME="latest"
elif [ "$TRAVIS_TAG" != "" ]; then
IMAGE_TAG_NAME="$TRAVIS_TAG"
fi;
- docker build --quiet -t gcr.io/deep-wares-144610/$TRAVIS_BRANCH/chronomint:$IMAGE_TAG_NAME .
- docker push gcr.io/deep-wares-144610/$TRAVIS_BRANCH/chronomint:$IMAGE_TAG_NAME
- kill -9 $(ps ax | grep testrpc)
- kill -9 $(ps ax | grep bridge.js)
- yarn test --coverage
- yarn build
after_script:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- FULL_GCR_KEY="-----BEGIN PRIVATE KEY-----\n"$GCR_KEY"\n-----END PRIVATE KEY-----\n"
- sed -i -e "s%\PWD%$FULL_GCR_KEY%g" gcregistry.json
- sed -i -e "s%branch%$TRAVIS_BRANCH%g" Dockerfile
- cat Dockerfile
- docker login -u _json_key -p "$(cat gcregistry.json)" https://gcr.io
- rm -rf gcregistry.json
- |
if [ "$TRAVIS_TAG" == "" ]; then
IMAGE_TAG_NAME="latest"
elif [ "$TRAVIS_TAG" != "" ]; then
IMAGE_TAG_NAME="$TRAVIS_TAG"
fi;
- docker build --quiet -t gcr.io/deep-wares-144610/$TRAVIS_BRANCH/chronomint:$IMAGE_TAG_NAME .
- docker push gcr.io/deep-wares-144610/$TRAVIS_BRANCH/chronomint:$IMAGE_TAG_NAME
- kill -9 $(ps aux | grep '[t]estrpc' | awk '{print $2}')

cache:
yarn: true
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,43 @@
# ChronoMint [![Build Status](https://travis-ci.org/ChronoBank/ChronoMint.svg?branch=master)](https://travis-ci.org/ChronoBank/ChronoMint) [![Coverage Status](https://coveralls.io/repos/github/ChronoBank/ChronoMint/badge.svg)](https://coveralls.io/github/ChronoBank/ChronoMint) [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
Control panel for ChronoBank

*NodeJS 7.9.0 required*

## Install
```bash
npm i
yarn
```

## Development
Start TestRPC in a separate terminal by doing:
```bash
npm run testrpc
yarn testrpc
```

Then in another separate terminal:
Then in another separate terminal (optional):
```bash
npm run bridge
yarn bridge
```

Wait for _Listening @..._ message and don't exit from this process!

After that deploy contracts with:
```bash
npm run contracts
yarn contracts
```

And finally:
```bash
npm start
yarn start
```

Now you able to access ChronoMint dApp through the [http://localhost:3000/](http://localhost:3000/)

To open truffle console use:
```bash
npm run tconsole
yarn tconsole
```

## Test
```bash
npm test
yarn test
```
To test separate specs just add your regex at the end of this command.
To test separate specs just add your regex at the end of this command. Ensure what `yarn testrpc` is already ran in separate console
Binary file added geth
Binary file not shown.
76 changes: 76 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow

var child = require('child_process').execFile;
var executablePath = "./geth";
var parameters = ["-light","--rpc"];


const path = require('path')
const url = require('url')

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow

function createWindow () {
// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600})

// and load the index.html of the app.
let loadUrl = url.format({
pathname: path.join(__dirname, 'build/index.html'),
protocol: 'file:',
slashes: true
})
if (process.env.LOAD_URL) {
loadUrl = process.env.LOAD_URL;
}
mainWindow.loadURL(loadUrl);
console.log('hui');
child(executablePath, parameters, function(err, data) {
console.log(err)
console.log(data.toString());
});


// Open the DevTools.
// mainWindow.webContents.openDevTools()

// Emitted when the window is closed.
mainWindow.on('closed', function () {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null
})
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)

// Quit when all windows are closed.
app.on('window-all-closed', function () {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit()
}
})

app.on('activate', function () {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) {
createWindow()
}
})

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

Loading

0 comments on commit bc7abc8

Please sign in to comment.