const path = require('path'); module.exports = { tags: async (tln) => [], env: async (tln, env) => { env.SOLC_HOME = env.TLN_COMPONENT_HOME; env.PATH = [env.TLN_COMPONENT_HOME, env.PATH].join(path.delimiter); }, options: async (tln, args) => {}, dotenvs: async (tln) => [], inherits: async (tln) => [], depends: async (tln) => [], steps: async (tln) => [ { id: 'install', builder: async (tln, script) => { const id = script.env.TLN_COMPONENT_ID; const home = script.env.TLN_COMPONENT_HOME; const {name, version} = tln.unpackId(id); if (version && tln.canInstallComponent(tln, id, home)) { script.set(tln.getDownloadScript(tln, { linux: { name: `solc`, opts: null, url: `https://github.com/ethereum/solidity/releases/download/v${version}/solc-static-linux`, cmd: 'mv ./solc-static-linux ./solc && chmod +x ./solc', keep: true }, darwin: { name: `kubectl`, opts: null, url: `https://github.com/ethereum/solidity/releases/download/v${version}/solc-macos`, cmd: 'mv ./solc-macos ./solc && chmod +x ./solc', keep: true }, win32: { name: `kubectl.exe`, opts: null, url: `https://github.com/ethereum/solidity/releases/download/v${version}/solc-windows.exe`, cmd: 'ren solc-windows.exe solc.exe', keep: true } })); } } } ], components: async (tln) => require('./components.js') }