const path = require('path'); module.exports = { tags: async (tln) => [], dotenvs: async (tln) => [], env: async (tln, env) => { env.KUBECTL_HOME = env.TLN_COMPONENT_HOME; env.PATH = [env.TLN_COMPONENT_HOME, env.PATH].join(path.delimiter); }, options: async (tln, args) => [], inherits: async (tln) => [], depends: async (tln) => [], steps: async (tln) => [ { id: 'install', filter: '', 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: `cm_linux_amd64`, opts: null, url: `https://github.com/aerokube/cm/releases/download/${version}/cm_linux_amd64`, cmd: 'mv ./cm_linux_amd64 ./cm && chmod +x ./cm', keep: true }, darwin: { name: `cm_darwin_amd64`, opts: null, url: `https://github.com/aerokube/cm/releases/download/${version}/cm_darwin_amd64`, cmd: 'mv ./cm_darwin_amd64 ./cm && chmod +x ./cm', keep: true }, win32: { name: `cm_windows_amd64.exe`, opts: null, url: `https://github.com/aerokube/cm/releases/download/${version}/cm_windows_amd64.exe`, cmd: 'ren cm_windows_amd64.exe cm.exe', keep: true } })); } } } ], components: async (tln) => require('./components.js') }