Skip to content

Commit

Permalink
Build fixes (#154)
Browse files Browse the repository at this point in the history
* build fixes

* don't do build before  migrate

* fix build on travis

* fix build on travis again
  • Loading branch information
dkent600 authored Mar 23, 2018
1 parent d662f0f commit f580a73
Show file tree
Hide file tree
Showing 7 changed files with 2,416 additions and 1,900 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
[
"env",
{
"targets": {
"node": "current"
},
"useBuiltIns": true
}
]
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ install:
- npm install
- nohup npm start test.ganache.run &
- npm start migrateContracts.fetchFromArc
- npm start build
- npm start migrateContracts

script:
Expand Down
4 changes: 2 additions & 2 deletions docs/Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

To deploy contracts to a specified network, follow these steps:

1. Set the environment variable "arcjs_network" (or "network" in /config/defaults.json in the Arc.js package) to the name of the network ("ganache", "kovan", "ropsten", "live"). The default is "ganache". Truffle will use this setting to find the specified settings in truffle.js in the Arc.js package. The migration script will also use this setting just to feedback to you which network truffle is using.
2. The migration script will use `arcjs_gasLimit_deployment` (or "gasLimit_deployment" in /config/defaults.json in the Arc.js package), allowing you to customize the gas amount if needed.
1. Set the environment variable "arcjs_network" to the name of the network ("ganache", "kovan", "ropsten", "live"). The default is "ganache". Truffle will use this setting to find the specified settings in truffle.js in the Arc.js package. The migration script will also use this setting just to feedback to you which network truffle is using.
2. The migration script will use `arcjs_gasLimit_deployment`, allowing you to customize the gas amount if needed.
3. make sure that /migrations/founders.json in the Arc.js package folder has an entry for your test network with the founders to add to the Genesis DAO.
4. make sure you have your testnet running and listening on the right port.

Expand Down
8 changes: 5 additions & 3 deletions migrations/2_deploy_organization.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// the following requires that a build has been done
const Config = require("../dist/configService").ConfigService;
const config = require("../config/default.json");
const env = require("env-variable")();
// must've done a build to ensure these are good.
const DefaultSchemePermissions = require("../dist/commonTypes").DefaultSchemePermissions;
/**
* Migration callback
*/
module.exports = async (deployer) => {

const gasAmount = Config.get("gasLimit_deployment");
const network = Config.get("network");
const gasAmount = env.arcjs_gasLimit_deployment || config.gasLimit_deployment;
const network = env.arcjs_network || config.network || "ganache";
const founders = require("./founders.json").founders[network];

/* eslint-disable no-console */
Expand Down
Loading

0 comments on commit f580a73

Please sign in to comment.