box: use go-version everywhere
This commit is contained in:
parent
f12c2f944a
commit
ef62f2782e
10
box.rb
10
box.rb
|
@ -1,21 +1,19 @@
|
|||
$goVer = "1.9"
|
||||
$goVer = "1.9.2"
|
||||
$repoPath = "git.xeserv.us/xena/route"
|
||||
|
||||
from "xena/go-mini:#{$goVer}"
|
||||
|
||||
run "go download"
|
||||
run "go#{$goVer} download"
|
||||
|
||||
[
|
||||
"vendor",
|
||||
"internal",
|
||||
"proto",
|
||||
"cmd",
|
||||
"plugins",
|
||||
"doc",
|
||||
].each { |x| copy x+"/", "/root/go/src/#{$repoPath}/#{x}" }
|
||||
|
||||
run "apk --no-cache add build-base"
|
||||
run "go build -v #{$repoPath}/cmd/... && go install -v #{$repoPath}/cmd/..."
|
||||
run "go#{$goVer} build -v #{$repoPath}/cmd/... && go#{$goVer} install -v #{$repoPath}/cmd/..."
|
||||
run "apk del build-base"
|
||||
|
||||
[
|
||||
|
@ -26,7 +24,7 @@ run "apk del build-base"
|
|||
|
||||
tag "xena/route:thick"
|
||||
|
||||
run "apk del go1.9 && rm -rf /root/sdk /root/go"
|
||||
run "apk del go#{$goVer} && rm -rf /root/sdk /root/go"
|
||||
flatten
|
||||
|
||||
tag "xena/route:latest"
|
||||
|
|
Loading…
Reference in New Issue