-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
108 lines (88 loc) · 3.81 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
103
104
105
106
107
108
version: "3"
vars:
GREETING: Hello, Bhojpur Disease Developer!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
build-library:
desc: Build the Bhojpur Disease software shared libraries
cmds:
- GOFLAGS=-mod=mod go build -o libs/disease.so -buildmode=c-shared ./library.go
build-tools:
desc: Build the Bhojpur Disease software build tools
cmds:
- GOFLAGS=-mod=mod go build -o dist/diseasectl ./cmd/client/main.go
- chmod 755 dist/diseasectl
- cp dist/diseasectl $GOPATH/bin
- GOFLAGS=-mod=mod go build -o dist/diseasesvr ./cmd/server/main.go
- chmod 755 dist/diseasesvr
- cp dist/diseasesvr $GOPATH/bin
build-web:
desc: Build the Bhojpur Disease web applications
cmds:
- pyinstaller --onefile ./files/usr/local/bin/disease.py
build-desktop:
desc: Build the desktop application for current OS
cmds:
- guiutl package -name "Bhojpur Disease" -os macos -icon disease.png
- guiutl package -name "Bhojpur Disease" -os linux -icon disease.png
- guiutl package -name "Bhojpur Disease" -os windows -icon disease.png
package-android:
desc: Package the mobile application for Android
cmds:
- guiutl package -name "Bhojpur Disease" -os android -appID net.bhojpur.disease -icon disease.png
package-ios:
desc: Package the mobile application for iOS
cmds:
- guiutl package -name "Bhojpur Disease" -os ios -appID net.bhojpur.disease -icon disease.png
release-macos:
desc: Release the native application for macOS App Store
cmds:
- guiutl release -appID net.bhojpur.disease -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.disease -appVersion 1.0 -appBuild 1
release-ios:
desc: Release the mobile application for iOS App Store
cmds:
- guiutl release -os ios -appID net.bhojpur.disease -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/github.com/gogo/protobuf --go_out=./pkg/api --go_opt=module=github.com/bhojpur/disease/pkg/api pkg/api/v1/server/stt.proto
- protoc --proto_path=. --proto_path=$GOPATH/src/github.com/gogo/protobuf --go-grpc_out=./pkg/api --go-grpc_opt=module=github.com/bhojpur/disease/pkg/api pkg/api/v1/server/stt.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/disease/internal bhojpur.net/disease/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