-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
102 lines (84 loc) · 4.34 KB
/
Taskfile.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: "3"
vars:
GREETING: Hello, Bhojpur SCF Developer!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
build-tools:
desc: Build the Supply Chain Finance software tools
cmds:
- GOFLAGS=-mod=mod go build -o bin/scfctl ./cmd/client/main.go
- chmod 755 bin/scfctl
- cp bin/scfctl $GOPATH/bin
- GOFLAGS=-mod=mod go build -o bin/scfsvr ./cmd/server/main.go
- chmod 755 bin/scfsvr
- cp bin/scfsvr $GOPATH/bin
build-desktop:
desc: Build the desktop application for current OS
cmds:
- guiutl package -name "Bhojpur SCF" -os macos -icon scf.png
- guiutl package -name "Bhojpur SCF" -os linux -icon scf.png
- guiutl package -name "Bhojpur SCF" -os windows -icon scf.png
package-android:
desc: Package the mobile application for Android
cmds:
- guiutl package -name "Bhojpur SCF" -os android -appID net.bhojpur.scf -icon scf.png
package-ios:
desc: Package the mobile application for iOS
cmds:
- guiutl package -name "Bhojpur SCF" -os ios -appID net.bhojpur.scf -icon scf.png
release-macos:
desc: Release the native application for macOS App Store
cmds:
- guiutl release -appID net.bhojpur.scf -appVersion 1.0 -appBuild 1 -category business
release-android:
desc: Release the mobile application for Google Play
cmds:
- guiutl release -os android -appID net.bhojpur.scf -appVersion 1.0 -appBuild 1
release-ios:
desc: Release the mobile application for iOS App Store
cmds:
- guiutl release -os ios -appID net.bhojpur.scf -appVersion 1.0 -appBuild 1
run-web-server:
desc: Run the web server application from source code
cmds:
- GOFLAGS=-mod=mod go run server.go
run-web-client:
desc: Run the web client application from source code
cmds:
- GOFLAGS=-mod=mod go run client.go
run-mobile:
desc: Run the mobile client application on emulator
cmds:
- GOFLAGS=-mod=mod go run -tags mobile native/main.go
run-desktop:
desc: Run the desktop application on local host
cmds:
- GOFLAGS=-mod=mod go run native/main.go
generate:
desc: Generate Go source code from Protocol Buffers
cmds:
- protoc --proto_path=. --proto_path=$GOPATH/src/googleapis --proto_path=$GOPATH/src/github.com/gogo/protobuf --go_out=./pkg/api --go_opt=module=github.com/bhojpur/scf/pkg/api pkg/api/v1/consignment/consignment.proto
- protoc --proto_path=. --proto_path=$GOPATH/src/googleapis --proto_path=$GOPATH/src/github.com/gogo/protobuf --go-grpc_out=./pkg/api --go-grpc_opt=module=github.com/bhojpur/scf/pkg/api pkg/api/v1/consignment/consignment.proto
- protoc --proto_path=. --proto_path=$GOPATH/src/googleapis --proto_path=$GOPATH/src/github.com/gogo/protobuf --go_out=./pkg/api --go_opt=module=github.com/bhojpur/scf/pkg/api pkg/api/v1/vessel/vessel.proto
- protoc --proto_path=. --proto_path=$GOPATH/src/googleapis --proto_path=$GOPATH/src/github.com/gogo/protobuf --go-grpc_out=./pkg/api --go-grpc_opt=module=github.com/bhojpur/scf/pkg/api pkg/api/v1/vessel/vessel.proto
- protoc --proto_path=. --proto_path=$GOPATH/src/googleapis --proto_path=$GOPATH/src/github.com/gogo/protobuf --go_out=./pkg/api --go_opt=module=github.com/bhojpur/scf/pkg/api pkg/api/v1/quote/freight_quoter.proto
- protoc --proto_path=. --proto_path=$GOPATH/src/googleapis --proto_path=$GOPATH/src/github.com/gogo/protobuf --go-grpc_out=./pkg/api --go-grpc_opt=module=github.com/bhojpur/scf/pkg/api pkg/api/v1/quote/freight_quoter.proto
test:
desc: Execute all the Unit Tests
cmds:
- gotestsum --junitfile test-results/unit-tests.xml -- -short -race -cover -coverprofile test-results/cover.out ./...
swagger.gen:
desc: Generate Go code
cmds:
- GOFLAGS=-mod=mod go generate bhojpur.net/scf/internal bhojpur.net/scf/pkg/swagger
swagger.validate:
desc: Validate all the Swagger API specifications
cmds:
- swagger validate pkg/swagger/swagger.yml
swagger.doc:
desc: Generate documentation for Swagger specified APIs
cmds:
- docker run -i yousan/swagger-yaml-to-html < pkg/swagger/swagger.yml > doc/index.html