101 lines
2.8 KiB
YAML
101 lines
2.8 KiB
YAML
# This is a GoReleaser configuration file for sshtunnel
|
|
# Compatible with GoReleaser v1.26.2
|
|
# https://goreleaser.com/customization/
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
|
|
builds:
|
|
- env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w
|
|
- -X git.mvl.sh/vleeuwenmenno/sshtunnel/cmd.Version={{.Version}}
|
|
- -X git.mvl.sh/vleeuwenmenno/sshtunnel/cmd.BuildDate={{.Date}}
|
|
|
|
archives:
|
|
- format: tar.gz
|
|
name_template: >-
|
|
{{ .ProjectName }}_
|
|
{{- title .Os }}_
|
|
{{- if eq .Arch "amd64" }}x86_64
|
|
{{- else if eq .Arch "386" }}i386
|
|
{{- else }}{{ .Arch }}{{ end }}
|
|
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
|
format_overrides:
|
|
- goos: windows
|
|
format: zip
|
|
|
|
checksum:
|
|
name_template: "checksums.txt"
|
|
|
|
snapshot:
|
|
name_template: "{{ incpatch .Version }}-next"
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- "^docs:"
|
|
- "^test:"
|
|
|
|
# Homebrew formula
|
|
brews:
|
|
- name: sshtunnel
|
|
homepage: "https://git.mvl.sh/vleeuwenmenno/sshtunnel"
|
|
description: "SSH tunnel manager CLI tool"
|
|
license: "MIT"
|
|
commit_author:
|
|
name: goreleaserbot
|
|
email: goreleaser@carlosbecker.com
|
|
install: |
|
|
bin.install "sshtunnel"
|
|
|
|
# Generate shell completions
|
|
output = Utils.safe_popen_read("#{bin}/sshtunnel", "completion", "bash")
|
|
(bash_completion/"sshtunnel").write output
|
|
|
|
output = Utils.safe_popen_read("#{bin}/sshtunnel", "completion", "zsh")
|
|
(zsh_completion/"_sshtunnel").write output
|
|
|
|
output = Utils.safe_popen_read("#{bin}/sshtunnel", "completion", "fish")
|
|
(fish_completion/"sshtunnel.fish").write output
|
|
test: |
|
|
system "#{bin}/sshtunnel", "version"
|
|
|
|
# .deb and .rpm packages
|
|
nfpms:
|
|
- file_name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
|
|
homepage: https://git.mvl.sh/vleeuwenmenno/sshtunnel
|
|
description: "SSH tunnel manager CLI tool"
|
|
maintainer: Menno van Leeuwen
|
|
license: MIT
|
|
vendor: vleeuwenmenno
|
|
formats:
|
|
- deb
|
|
- rpm
|
|
dependencies:
|
|
- openssh-client
|
|
recommends:
|
|
- bash-completion
|
|
scripts:
|
|
postinstall: |
|
|
mkdir -p /usr/share/bash-completion/completions/
|
|
mkdir -p /usr/share/zsh/site-functions/
|
|
mkdir -p /usr/share/fish/vendor_completions.d/
|
|
sshtunnel completion bash > /usr/share/bash-completion/completions/sshtunnel
|
|
sshtunnel completion zsh > /usr/share/zsh/site-functions/_sshtunnel
|
|
sshtunnel completion fish > /usr/share/fish/vendor_completions.d/sshtunnel.fish
|
|
chmod 644 /usr/share/bash-completion/completions/sshtunnel || true
|
|
chmod 644 /usr/share/zsh/site-functions/_sshtunnel || true
|
|
chmod 644 /usr/share/fish/vendor_completions.d/sshtunnel.fish || true
|