github.com/bhojpur/cache@v0.0.4/Taskfile.yml (about)

     1  version: "3"
     2  
     3  vars:
     4    GREETING: Hello, Cache Developer!
     5  
     6  tasks:
     7      default:
     8          cmds:
     9          - echo "{{.GREETING}}"
    10          silent: true
    11  
    12      build-web:
    13          desc: Build the web application
    14          cmds:
    15          - GOFLAGS=-mod=mod go build -o bin/cachectl client.go 
    16          - GOFLAGS=-mod=mod go build -o bin/cachesvr server.go 
    17          - GOFLAGS=-mod=mod go build -o bin/cachedbg ./internal/main.go
    18  
    19      build-desktop:
    20          desc: Build the desktop application for current OS
    21          cmds:
    22          - fyne package -os macos -icon cache.png
    23          - fyne package -os linux -icon cache.png
    24          - fyne package -os windows -icon cache.png
    25  
    26      package-android:
    27          desc: Package the mobile application for Android
    28          cmds:
    29          - fyne package -os android -appID net.bhojpur.cache -icon cache.png
    30  
    31      package-ios:
    32          desc: Package the mobile application for iOS
    33          cmds:
    34          - fyne package -os ios -appID net.bhojpur.cache -icon cache.png
    35  
    36      release-macos:
    37          desc: Release the native application for macOS App Store
    38          cmds:
    39          - fyne release -appID net.bhojpur.cache -appVersion 1.0 -appBuild 1 -category business
    40  
    41      release-android:
    42          desc: Release the mobile application for Google Play
    43          cmds:
    44          - fyne release -os android -appID net.bhojpur.cache -appVersion 1.0 -appBuild 1
    45  
    46      release-ios:
    47          desc: Release the mobile application for iOS App Store
    48          cmds:
    49          - fyne release -os ios -appID net.bhojpur.cache -appVersion 1.0 -appBuild 1
    50  
    51      run-web-server:
    52          desc: Run the web server application from source code
    53          cmds:
    54          - GOFLAGS=-mod=mod go run server.go
    55   
    56      run-web-client:
    57          desc: Run the web client application from source code
    58          cmds:
    59          - GOFLAGS=-mod=mod go run client.go
    60  
    61      run-mobile:
    62          desc: Run the mobile client application on emulator
    63          cmds:
    64          - GOFLAGS=-mod=mod go run -tags mobile native/main.go
    65  
    66      run-desktop: 
    67          desc: Run the desktop application on local host
    68          cmds:
    69          - GOFLAGS=-mod=mod go run native/main.go
    70  
    71      generate:
    72          desc: Generate Go source code from Protool Buffers
    73          cmds:
    74          - protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/api/v1/cache.proto
    75          - protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/api/v1/cache-ui.proto
    76  
    77      test:
    78          desc: Execute all the Unit Tests
    79          cmds:
    80          - gotestsum --junitfile test-results/unit-tests.xml -- -short -race -cover -coverprofile test-results/cover.out ./...
    81  
    82      swagger.gen:
    83          desc: Generate Go code
    84          cmds:
    85          - GOFLAGS=-mod=mod go generate bhojpur.net/cache/internal bhojpur.net/cache/pkg/swagger
    86  
    87      swagger.validate:
    88          desc: Validate all the Swagger API specifications
    89          cmds:
    90          - swagger validate pkg/swagger/swagger.yml
    91  
    92      swagger.doc:
    93          desc: Generate documentation for Swagger specified APIs
    94          cmds:
    95          - docker run -i yousan/swagger-yaml-to-html < pkg/swagger/swagger.yml > doc/index.html