Unverified Commit 48375aa9 by Hadrien Croubois Committed by GitHub

Read optional compiler version from args/envvars (#2810)

parent 29957d4a
...@@ -7,9 +7,28 @@ const fs = require('fs'); ...@@ -7,9 +7,28 @@ const fs = require('fs');
const path = require('path'); const path = require('path');
const argv = require('yargs/yargs')() const argv = require('yargs/yargs')()
.env('') .env('')
.boolean('enableGasReport') .options({
.boolean('ci') ci: {
.string('compileMode') type: 'boolean',
default: false,
},
gas: {
alias: 'enableGasReport',
type: 'boolean',
default: false,
},
mode: {
alias: 'compileMode',
type: 'string',
choices: [ 'production', 'development' ],
default: 'development',
},
compiler: {
alias: 'compileVersion',
type: 'string',
default: '0.8.3',
},
})
.argv; .argv;
require('@nomiclabs/hardhat-truffle5'); require('@nomiclabs/hardhat-truffle5');
...@@ -30,7 +49,7 @@ const withOptimizations = argv.enableGasReport || argv.compileMode === 'producti ...@@ -30,7 +49,7 @@ const withOptimizations = argv.enableGasReport || argv.compileMode === 'producti
*/ */
module.exports = { module.exports = {
solidity: { solidity: {
version: '0.8.3', version: argv.compiler,
settings: { settings: {
optimizer: { optimizer: {
enabled: withOptimizations, enabled: withOptimizations,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment