-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
94 lines (76 loc) · 3.01 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
version: "3"
vars:
GREETING: Hello, Middleware Developer!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
build-web:
desc: Build the web application
cmds:
- GOFLAGS=-mod=mod go build -o bin/mdwctl client.go
- GOFLAGS=-mod=mod go build -o bin/mdwsvr server.go
build-desktop:
desc: Build the desktop application for current OS
cmds:
- fyne package -os macos -icon middleware.png
- fyne package -os linux -icon middleware.png
- fyne package -os windows -icon middleware.png
package-android:
desc: Package the mobile application for Android
cmds:
- fyne package -os android -appID net.bhojpur.middleware -icon middleware.png
package-ios:
desc: Package the mobile application for iOS
cmds:
- fyne package -os ios -appID net.bhojpur.middleware -icon middleware.png
release-macos:
desc: Release the native application for macOS App Store
cmds:
- fyne release -appID net.bhojpur.middleware -appVersion 1.0 -appBuild 1 -category business
release-android:
desc: Release the mobile application for Google Play
cmds:
- fyne release -os android -appID net.bhojpur.middleware -appVersion 1.0 -appBuild 1
release-ios:
desc: Release the mobile application for iOS App Store
cmds:
- fyne release -os ios -appID net.bhojpur.middleware -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 Protool Buffers
cmds:
- protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/api/v1/middleware.proto
- protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/api/v1/middleware-ui.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/middleware/internal bhojpur.net/middleware/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