Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
0x-r4bbit committed Feb 11, 2020
1 parent 0b795b8 commit c08b658
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
25 changes: 3 additions & 22 deletions packages/core/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { readJsonSync } from 'fs-extra';
const cloneDeep = require('lodash.clonedeep');
const { replaceZeroAddressShorthand } = AddressUtils;

import { getBlockchainDefaults, getContractDefaults } from './configDefaults';
import { getBlockchainDefaults, getContractDefaults, embarkConfigDefaults } from './configDefaults';

const constants = readJsonSync(path.join(__dirname, '../constants.json'));

Expand Down Expand Up @@ -84,15 +84,7 @@ export class Config {

events: Events;

embarkConfig: EmbarkConfig = {
contracts: [],
config: '',
versions: {
solc: ''
},
generationDir: '',
migrations: ''
};
embarkConfig: EmbarkConfig = embarkConfigDefaults;

context: any;

Expand Down Expand Up @@ -193,7 +185,6 @@ export class Config {

this.embarkConfig = fs.readJSONSync(options.embarkConfig);
this.embarkConfig.plugins = this.embarkConfig.plugins || {};
this.embarkConfig.migrations = this.embarkConfig.migrations || constants.defaultMigrationsDir;

this.plugins = new Plugins({
plugins: this.embarkConfig.plugins,
Expand Down Expand Up @@ -639,17 +630,7 @@ export class Config {
}

loadEmbarkConfigFile() {
const configObject = {
options: {
solc: {
"optimize": true,
"optimize-runs": 200
}
},
generationDir: "embarkArtifacts"
};

this.embarkConfig = recursiveMerge(configObject, this.embarkConfig);
this.embarkConfig = recursiveMerge(embarkConfigDefaults, this.embarkConfig);

const contracts = this.embarkConfig.contracts;
// determine contract 'root' directories
Expand Down
16 changes: 16 additions & 0 deletions packages/core/core/src/configDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ import { join } from "path";

const constants = readJsonSync(join(__dirname, '../constants.json'));

export const embarkConfigDefaults = {
contracts: [],
config: '',
migrations: 'migrations',
versions: {
solc: "0.6.1"
},
options: {
solc: {
"optimize": true,
"optimize-runs": 200
}
},
generationDir: "embarkArtifacts"
};

export function getBlockchainDefaults(env) {
const defaults = {
clientConfig: {
Expand Down

0 comments on commit c08b658

Please sign in to comment.