This repository was archived by the owner on Mar 19, 2021. It is now read-only.
File tree 4 files changed +42
-3
lines changed
4 files changed +42
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,31 @@ kind: pipeline
2
2
name : default
3
3
4
4
steps :
5
- - name : test
5
+ - name : frontend
6
+ image : node
7
+ commands :
8
+ - cd frontend
9
+ - npm ci --registry=https://registry.npm.taobao.org
10
+ - npm run build
11
+
12
+ - name : backend
6
13
image : golang
7
14
commands :
8
- - sh build.sh
15
+ - sh build_go.sh
16
+
17
+ - name : gitea_release
18
+ image : plugins/gitea-release
19
+ settings :
20
+ base_url :
21
+ from_secret : gitea_url
22
+ api_key :
23
+ from_secret : gitea_token
24
+ checksum :
25
+ - sha256
26
+ files :
27
+ - Robot_Monitor_Web_linux.zip
28
+ - Robot_Monitor_Web_mac.zip
29
+ - Robot_Monitor_Web_windows.zip
30
+ when :
31
+ event : tag
9
32
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ cp main.go main.go.org
3
+ sed -i ' s/http.Dir(\".\/frontend\/dist\/\")/assetFS()/g' main.go
4
+ go get github.com/go-bindata/go-bindata/...
5
+ go get github.com/elazarl/go-bindata-assetfs/...
6
+ go-bindata-assetfs -prefix frontend frontend/dist/...
7
+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags=" -w -s" -o Robot_Monitor_Web_linux
8
+ CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags=" -w -s" -o Robot_Monitor_Web_mac
9
+ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags=" -w -s" -o Robot_Monitor_Web_windows.exe
10
+ zip Robot_Monitor_Web_linux.zip Robot_Monitor_Web_linux
11
+ zip Robot_Monitor_Web_mac.zip Robot_Monitor_Web_mac
12
+ zip Robot_Monitor_Web_windows.zip Robot_Monitor_Web_windows.exe
13
+ rm -f main.go
14
+ mv main.go.org main.go
Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ require (
8
8
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
9
9
github.com/gorilla/websocket v1.4.2
10
10
go.bug.st/serial.v1 v0.0.0-20191202182710-24a6610f0541
11
- golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 // indirect
11
+ golang.org/x/sys v0.0.0-20200620081246-981b61492c35 // indirect
12
12
)
Original file line number Diff line number Diff line change @@ -11,3 +11,5 @@ go.bug.st/serial.v1 v0.0.0-20191202182710-24a6610f0541 h1:eQfoPfT+gNSh63t/oKanQl
11
11
go.bug.st/serial.v1 v0.0.0-20191202182710-24a6610f0541 /go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw =
12
12
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4 =
13
13
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
14
+ golang.org/x/sys v0.0.0-20200620081246-981b61492c35 h1:wb/9mP8eUAmHfkM8RmpeLq6nUA7c2i5+bQOtcDftjaE =
15
+ golang.org/x/sys v0.0.0-20200620081246-981b61492c35 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
You can’t perform that action at this time.
0 commit comments