From e12db11d7c329af5acffb092ac54b48fac40382d Mon Sep 17 00:00:00 2001 From: Simone Ripamonti Date: Fri, 12 Mar 2021 10:17:22 +0100 Subject: [PATCH] Make goreleaser release .zip artifacts, bump travis go version --- .gitignore | 2 ++ .goreleaser.yml | 48 +++++++++++++++++++++--------------------------- .travis.yml | 2 +- 3 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index bd1e2dd..db8f08e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ config.ign.merged .terraform coverage.txt dist + +.idea \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 0fa4e89..c9276ad 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,40 +1,32 @@ # This is an example goreleaser.yaml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com +project_name: terraform-provider-vagrant builds: - - binary: terraform-provider-vagrant_v{{ .Version }} - env: - - CGO_ENABLED=0 + - binary: '{{ .ProjectName }}_{{ .Version }}' + flags: + - -trimpath + goarch: + - '386' + - amd64 + - arm + - arm64 goos: - darwin - freebsd - linux - - openbsd - - solaris - windows - goarch: - - 386 - - amd64 - - arm ignore: - - goos: darwin - goarch: 386 - - goos: darwin - goarch: arm - - goos: openbsd - goarch: arm - - goos: solaris - goarch: 386 - - goos: solaris - goarch: arm - - goos: windows - goarch: arm -archive: - name_template: "{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" - format_overrides: - - goos: windows - format: zip + - goarch: '386' + goos: darwin + ldflags: + - -s -w -X version.ProviderVersion={{.Version}} + mod_timestamp: '{{ .CommitTimestamp }}' +archives: + - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' + format: zip checksum: - name_template: 'checksums.txt' + name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' + algorithm: sha256 snapshot: name_template: "{{ .Tag }}-next" changelog: @@ -43,3 +35,5 @@ changelog: exclude: - '^docs:' - '^test:' +env: + - CGO_ENABLED=0 diff --git a/.travis.yml b/.travis.yml index 668850a..b6363e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ language: go go: - - 1.13 + - 1.16