release:
  prerelease: false

builds:
  - binary: dive
    env:
      - CGO_ENABLED=0
    goos:
      - windows
      - darwin
      - linux
    goarch:
      - amd64
    ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.buildTime={{.Date}}`.

brews:
  - tap:
      owner: wagoodman
      name: homebrew-dive
    homepage: "https://github.com/wagoodman/dive/"
    description: "A tool for exploring each layer in a docker image"

archives:
  - format: tar.gz
    format_overrides:
      - goos: windows
        format: zip

nfpms:
  - license: MIT
    maintainer: Alex Goodman
    homepage: https://github.com/wagoodman/dive/
    description: "A tool for exploring each layer in a docker image"
    formats:
      - rpm
      - deb

dockers:
  -
    binaries:
      - dive
    dockerfile: Dockerfile
    # todo: on 1.0 remove 'v' prefix
    image_templates:
      - "wagoodman/dive:latest"
      - "wagoodman/dive:{{ .Tag }}"
      - "wagoodman/dive:v{{ .Major }}"
      - "wagoodman/dive:v{{ .Major }}.{{ .Minor }}"
    build_flag_templates:
      - "--build-arg=DOCKER_CLI_VERSION={{.Env.DOCKER_CLI_VERSION}}"
