2017-12-11 06:16:23 +00:00
|
|
|
from "xena/go-mini:1.9.2"
|
2017-05-20 22:56:34 +00:00
|
|
|
|
|
|
|
### setup go
|
2017-12-11 06:16:23 +00:00
|
|
|
run "go1.9.2 download"
|
2017-05-20 22:56:34 +00:00
|
|
|
|
|
|
|
### Copy files
|
|
|
|
run "mkdir -p /site"
|
|
|
|
|
|
|
|
def put(file)
|
|
|
|
copy "./#{file}", "/site/#{file}"
|
|
|
|
end
|
|
|
|
|
|
|
|
files = [
|
|
|
|
"gops.go",
|
|
|
|
"hash.go",
|
|
|
|
"html.go",
|
|
|
|
"main.go",
|
|
|
|
"rss.go",
|
2017-12-13 19:42:17 +00:00
|
|
|
"run.sh",
|
|
|
|
"templates",
|
|
|
|
"blog",
|
|
|
|
"rice-box.go"
|
2017-05-20 22:56:34 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
files.each { |x| put x }
|
|
|
|
|
|
|
|
copy "vendor/", "/root/go/src/"
|
|
|
|
|
|
|
|
### Build
|
2017-12-11 06:16:23 +00:00
|
|
|
run "cd /site && go1.9.2 build -v"
|
2017-05-20 22:56:34 +00:00
|
|
|
|
|
|
|
### Cleanup
|
|
|
|
run %q[ rm -rf /root/go /site/backend /root/sdk /site/*.go ]
|
2017-12-11 06:24:31 +00:00
|
|
|
run %q[ apk del go1.9.2 ]
|
2017-05-20 22:56:34 +00:00
|
|
|
|
2017-05-23 19:47:17 +00:00
|
|
|
cmd "/site/run.sh"
|
2017-05-20 22:56:34 +00:00
|
|
|
|
|
|
|
flatten
|
|
|
|
tag "xena/christine.website"
|