...
This commit is contained in:
@@ -38,26 +38,23 @@ fn build() ! {
|
||||
installer.install()!
|
||||
|
||||
mut gs := gittools.get()!
|
||||
url := 'https://github.com/threefoldtech/web3gw/tree/development_integration/griddriver'
|
||||
|
||||
mut repo := gs.get_repo(
|
||||
url: 'https://github.com/threefoldtech/web3gw/tree/development_integration/griddriver'
|
||||
url: url
|
||||
reset: true
|
||||
pull: true
|
||||
pull: true
|
||||
)!
|
||||
|
||||
mut path := repo.get_path()!
|
||||
path = '${path}/griddriver'
|
||||
|
||||
cmd := '/bin/bash -c "cd ${path} && . ${path}/build.sh"'
|
||||
res := os.execute(cmd)
|
||||
if res.exit_code != 0 {
|
||||
return error('failed to build: ${res.output}')
|
||||
}
|
||||
|
||||
cmd := '
|
||||
set -ex
|
||||
cd ${path}
|
||||
go env -w CGO_ENABLED="0"
|
||||
go build -ldflags="-X \'main.version=$(git describe --tags --abbrev=0)\'" -o /tmp/griddriver .
|
||||
echo build ok
|
||||
'
|
||||
osal.execute_stdout(cmd)!
|
||||
osal.cmd_add(
|
||||
cmdname: 'griddriver'
|
||||
source: '/tmp/griddriver'
|
||||
)!
|
||||
console.print_header('build griddriver OK')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user