diff --git a/.circleci/config.yml b/.circleci/config.yml index d0cd6e6..c8e6325 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -156,9 +156,14 @@ jobs: - checkout - setup - install-goreleaser + - run: + name: Make a pseudo-tag for the snapshot build + command: | + latest_tag=$(git describe --tags --abbrev=0) + git tag ${latest_tag}+SNAPSHOT.$(git rev-parse --short HEAD) - run: name: Cross-build all targets - command: goreleaser build --rm-dist --snapshot + command: IS_SNAPSHOT=1 goreleaser release --rm-dist --skip-publish --skip-sign --skip-validate - store_artifacts: path: dist diff --git a/.goreleaser.yml b/.goreleaser.yml index f7d5fa5..ec59570 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -38,20 +38,20 @@ nfpms: 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.0.8. Needed to support installing `influxdb2-cli` next to `influxdb2` without upgrading + # package prior to 2.1.0. Needed to support installing `influxdb2-cli` next to `influxdb2` without upgrading # the server. - - influxdb2 (<< 2.0.8) - file_name_template: influxdb2-client-{{if index .Env "IS_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}-{{ .Arch }} + - 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.0.8. This is as good as we can do for rpm; there's no equivalent to deb's "replaces" metadata. - - influxdb2 < 2.0.8 + # 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_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}.{{ .Arch }} + 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 @@ -65,13 +65,13 @@ archives: - goos: windows format: zip wrap_in_directory: true - name_template: influxdb2-client-{{if index .Env "IS_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}-{{ .Os }}-{{ .Arch }} + 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_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}.sha256 + name_template: influxdb2-client-{{if index .Env "IS_SNAPSHOT"}}SNAPSHOT{{else if index .Env "IS_NIGHTLY"}}nightly{{else}}{{.Version}}{{end}}.sha256 algorithm: sha256 signs: