octolab/breakit

View on GitHub
.goreleaser.yml

Summary

Maintainability
Test Coverage
---
project_name: breakit

archives:
  - id: breakit
    files:
      - LICENSE
    format: tar.gz
    name_template: "{{.Binary}}_{{.Version}}_{{.Os}}-{{.Arch}}"
    replacements:
      386: 32bit
      amd64: 64bit
      darwin: macOS
      linux: Linux

brews:
  - name: breakit
    caveats:
    commit_author:
      name: Kamil Samigullin
      email: kamil@samigullin.info
    description: Flexible mechanism to execute commands for a limited time.
    folder: Formula
    homepage: https://github.com/octolab/breakit
    tap:
      owner: octolab
      name: homebrew-tap
    install: |
      bin.install "breakit"

      output = Utils.popen_read("#{bin}/breakit completion bash")
      (bash_completion/"breakit").write output

      output = Utils.popen_read("#{bin}/breakit completion fish")
      (fish_completion/"breakit.fish").write output

      output = Utils.popen_read("#{bin}/breakit completion zsh")
      (zsh_completion/"_breakit").write output

      prefix.install_metafiles
    test: |
      system "#{bin}/breakit version"

builds:
  - id: breakit
    binary: breakit
    env:
      - CGO_ENABLED=0
    flags:
      - -trimpath
    goarch:
      - 386
      - amd64
    goos:
      - darwin
      - linux
    ldflags:
      - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
    main: .

checksum: { name_template: checksums.txt }

release:
  github:
    owner: octolab
    name: breakit