-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrobo.yml
61 lines (58 loc) · 1.37 KB
/
robo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Commands
run:
command: |
go build -o webview-server
./webview-server
build-mac:
command: |
if [[ $(go env GOOS) == 'darwin' ]]; then
go build -o webview-server-mac.app
else
$(go env GOPATH)/bin/xgo \
-branch={{.branch}} \
-targets=darwin/amd64 \
{{.repo}}
fi
build-linux:
command: |
for arch in amd64 i386
do
docker run --rm -v \
"$PWD":/usr/src/webview-server \
-w /usr/src/webview-server \
patarapolw/webview-$arch \
go build -o "webview-server-linux-$arch"
done
build-windows:
command: |
$(go env GOPATH)/bin/xgo \
-ldflags="-H windowsgui" \
-branch={{.branch}} \
-targets=windows/* \
{{.repo}}
build-all:
summary: |
Build for Linux, Windows, and macOS
Install `xgo` using `go get github.com/karalabe/xgo`
command: |
robo -c {{ .robo.file }} build-linux
robo -c {{ .robo.file }} build-windows
robo -c {{ .robo.file }} build-mac
docker-build:
command: |
for arch in amd64 i386
do
docker build -t {{.docker}}-$arch -f Dockerfile.$arch .
done
docker-push:
command: |
for arch in amd64 i386
do
docker push {{.docker}}-$arch
done
##########
# Settings
variables:
repo: github.com/patarapolw/webview-server
docker: patarapolw/webview
branch: $(git branch --show-current)