diff --git a/.goreleaser-nightly.yml b/.goreleaser-nightly.yml index d19be31ce5..1162786974 100644 --- a/.goreleaser-nightly.yml +++ b/.goreleaser-nightly.yml @@ -42,10 +42,10 @@ archive: snapshot: name_template: 'nightly' -s3: - - - bucket: dl.influxdata.com - region: us-east-1 +blobs: + - provider: "s3" + bucket: "dl.influxdata.com" + region: "us-east-1" folder: "platform/nightlies/" dockers: diff --git a/.goreleaser.yml b/.goreleaser.yml index e7a28e3449..f1f04e7323 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,7 @@ project_name: influxdb builds: - - goos: + - id: influx + goos: - linux - darwin goarch: @@ -12,7 +13,8 @@ builds: - CGO_ENABLED=0 ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} binary: influx - - goos: + - id: influxd + goos: - linux - darwin goarch: @@ -29,22 +31,21 @@ builds: hooks: pre: make generate -archive: - format: tar.gz - wrap_in_directory: true - format_overrides: - - goos: windows - format: zip - name_template: 'influxdb_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ - .Arm }}{{ end }}' - files: - - LICENSE - - README.md +archives: + - format: tar.gz + wrap_in_directory: true + format_overrides: + - goos: windows + format: zip + name_template: 'influxdb_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + files: + - LICENSE + - README.md -s3: - - - bucket: dl.influxdata.com - region: us-east-1 +blobs: + - provider: "s3" + bucket: "dl.influxdata.com" + region: "us-east-1" folder: "influxdb/releases/" dockers: diff --git a/Makefile b/Makefile index 3908d17422..83cff809c0 100644 --- a/Makefile +++ b/Makefile @@ -163,16 +163,19 @@ bench: libflux build: all -dist: - $(GO_RUN) github.com/goreleaser/goreleaser --snapshot --rm-dist --config=.goreleaser-nightly.yml +goreleaser: + curl -sfL -o goreleaser-install https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh + sh goreleaser-install v0.135.0 -nightly: - $(GO_RUN) github.com/goreleaser/goreleaser --snapshot --rm-dist --publish-snapshots --config=.goreleaser-nightly.yml +dist: goreleaser + ./bin/goreleaser --rm-dist --config=.goreleaser-nightly.yml -release: - $(GO_INSTALL) github.com/goreleaser/goreleaser +nightly: goreleaser + ./bin/goreleaser --rm-dist --config=.goreleaser-nightly.yml + +release: goreleaser git checkout -- go.sum # avoid dirty git repository caused by go install - goreleaser release --rm-dist + ./bin/goreleaser release --rm-dist clean: @for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done @@ -226,4 +229,4 @@ dshell: dshell-image @docker container run --rm -p 9999:9999 -p 8080:8080 -u $(shell id -u) -it -v $(shell pwd):/code -w /code influxdb:dshell # .PHONY targets represent actions that do not create an actual file. -.PHONY: all $(SUBDIRS) run fmt checkfmt tidy checktidy checkgenerate test test-go test-js test-go-race bench clean node_modules vet nightly chronogiraffe dist ping protoc e2e run-e2e influxd libflux flags dshell dclean docker-image-flux docker-image-influx +.PHONY: all $(SUBDIRS) run fmt checkfmt tidy checktidy checkgenerate test test-go test-js test-go-race bench clean node_modules vet nightly chronogiraffe dist ping protoc e2e run-e2e influxd libflux flags dshell dclean docker-image-flux docker-image-influx goreleaser