version: 2
project_name: kargo
builds:
- id: kargo
  main: ./cmd/cli
  goos:
  # - linux
  - darwin
  # - windows
  goarch:
  - amd64
  - arm64
  ignore:
  - goos: windows
    goarch: arm64
  env:
  - CGO_ENABLED=0
  ldflags:
  - "-s -w -X main.version={{ .Version }} -X main.commit={{ .Commit }} -X main.date={{ .Date }}"
  no_unique_dist_dir: true
  binary: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
archives:
- format: binary
  name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
release:
  github:
    owner: krancour
    name: kargo
brews:
- name: Formula/kargo
  description: CLI for Kargo
  homepage: https://kargo.io
  license: Apache-2.0
  install: |
    bin.install "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}" => "{{ .ProjectName }}"
  test: |
    assert_match "Client Version: v#{version}", shell_output("#{bin}/kargo version --client")
  repository:
    owner: krancour
    name: homebrew-tap
    branch: "{{.ProjectName}}-{{.Version}}"
    pull_request:
      enabled: true
      base:
        branch: main
