Commit 134b6eb7 authored by Kirill Smelkov's avatar Kirill Smelkov

golang: Provide ${go:exe}

${go:exe} is standalone executable that runs go in activated gowork environment.
It is handy to use in recipes where one cannot source ${gowork:env} -
in particular parts with recipe=zc.recipe.egg

Wendelin.core 2 will use `GO=${go:exe}` in its build environment.
parent 86b1315f
...@@ -6,7 +6,7 @@ extends = ...@@ -6,7 +6,7 @@ extends =
../git/buildout.cfg ../git/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
parts = gowork parts = gowork go
# ---- Go builds itself ---- # ---- Go builds itself ----
...@@ -84,6 +84,18 @@ environment-extra = ...@@ -84,6 +84,18 @@ environment-extra =
# #
# [gowork] # [gowork]
# buildflags = -race # buildflags = -race
#
# ${go:exe} is standalone executable that runs go in activated gowork environment.
[go]
recipe = slapos.recipe.template:jinja2
exe = ${buildout:bin-directory}/go
rendered= ${:exe}
mode = 755
template= inline:
#!/bin/sh -e
. ${gowork:env.sh}
exec go "$@"
[gowork] [gowork]
directory = ${buildout:directory}/go.work directory = ${buildout:directory}/go.work
src = ${:directory}/src src = ${:directory}/src
......
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