---
version: "3"

tasks:
  build:
    desc: "Builds Featurer's CMS binary."
    cmds:
      - task: cleanup
      - go build -ldflags="{{ .LDFLAGS }}" -tags netgo -o _build/featurer-cms{{exeExt}} ./server/cmd/cms/main.go
    sources:
      - ./**/*.go
      - ./Taskfile.yml
      - ./go.mod
    generates:
      - ./_build/featurer-cms{{exeExt}}
    method: none

  cleanup:
    desc: "Deletes Featurer's CMS binary from local build cache."
    cmds:
      - rm -f _build/featurer-cms{{exeExt}}
