Files
influx-cli/.goreleaser.yml
Daniel Moran d92bede8d3 fix: embed tzdata into Windows builds (#305)
Migrate cross-test jobs to use cross-builder so Windows tests run on a system without Go, as a regression test
2021-10-14 08:49:26 -07:00

90 lines
2.8 KiB
YAML

project_name: influx-cli
# Do not make github release
release:
disable: true
builds:
- id: influx
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: darwin
goarch: arm64
- goos: windows
goarch: arm64
main: ./cmd/influx
env:
- CGO_ENABLED=0
flags:
- -tags={{if eq .Os "windows"}}timetzdata{{end}}
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}
binary: influx
nfpms:
- id: influx-cli
package_name: influxdb2-cli
formats:
- deb
- rpm
bindir: /usr/bin
conflicts:
- influxdb
overrides:
deb:
replaces:
# Tells the deb system that it's ok for this package to overwrite files from versions of the `influxdb2`
# package prior to 2.1.0. Needed to support installing `influxdb2-cli` next to `influxdb2` without upgrading
# the server.
- influxdb2 (<< 2.1.0)
file_name_template: influxdb2-client-{{if index .Env "IS_SNAPSHOT"}}SNAPSHOT{{else if index .Env "IS_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}-{{ .Arch }}
rpm:
conflicts:
# Tells the rpm system that this package can't be installed alongside versions of the `influxdb2` package
# prior to 2.1.0. This is as good as we can do for rpm; there's no equivalent to deb's "replaces" metadata.
- influxdb2 < 2.1.0
replacements:
amd64: x86_64
arm64: aarch64
armhf: armv7hl
file_name_template: influxdb2-client-{{if index .Env "IS_SNAPSHOT"}}SNAPSHOT{{else if index .Env "IS_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}.{{ .Arch }}
vendor: InfluxData
homepage: https://influxdata.com
maintainer: support@influxdata.com
description: CLI for managing resources in InfluxDB v2
license: MIT
archives:
- id: influx-cli
format: tar.gz
format_overrides:
- goos: windows
format: zip
wrap_in_directory: true
name_template: influxdb2-client-{{if index .Env "IS_SNAPSHOT"}}SNAPSHOT{{else if index .Env "IS_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}-{{ .Os }}-{{ .Arch }}
files:
- LICENSE
- README.md
checksum:
name_template: influxdb2-client-{{if index .Env "IS_SNAPSHOT"}}SNAPSHOT{{else if index .Env "IS_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}.sha256
algorithm: sha256
signs:
- signature: "${artifact}.asc"
cmd: gpg
args: [ --passphrase, "{{.Env.PASSPHRASE}}", --pinentry-mode=loopback, --batch, --armor, --detach-sign, "${artifact}"]
artifacts: all
blobs:
- provider: s3
bucket: dl.influxdata.com
region: us-east-1
folder: '{{if index .Env "IS_NIGHTLY"}}platform/nightlies/{{else}}influxdb/releases/{{end}}'