site/box.rb

37 lines
510 B
Ruby
Raw Normal View History

2018-03-30 00:27:15 +00:00
from "xena/go:1.10"
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
2018-03-30 00:27:15 +00:00
run "cd /site && go build -v"
2017-05-20 22:56:34 +00:00
### Cleanup
run %q[ rm -rf /root/go /site/backend /root/sdk /site/*.go ]
2018-02-09 06:51:17 +00:00
run %q[ rm -rf /usr/local/bin/go* ]
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"