Skip to content

Commit

Permalink
Update goreleaser config based on recommendations
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitrios Karagiannis <[email protected]>
  • Loading branch information
alkar committed Oct 16, 2020
1 parent 38b23cd commit 88cdb06
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
36 changes: 21 additions & 15 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
project_name: terraform-provider-megaport

builds:
- binary: "terraform-provider-megaport_v{{.Version}}_x4"
- binary: "{{ .ProjectName }}_{{.Version}}_x4"
env:
- CGO_ENABLED=0
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X main.buildVersion={{.Version}} -X main.buildCommit={{.Commit}}'
goos:
- darwin
- windows
- linux
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
ldflags: []
- amd64
- 386
- arm
- arm64
ignore:
- goos: darwin
goarch: 386

archives:
- name_template: "{{.ProjectName}}-{{.Os}}-{{.Arch}}"
format_overrides:
- goos: windows
format: zip
- goos: darwin
format: zip
- goos: linux
format: zip
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
format: zip
files:
- none* # only package the binary

checksum:
name_template: 'SHA256SUMS.txt'
algorithm: sha256
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ package main

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"

"github.com/utilitywarehouse/terraform-provider-megaport/megaport"
)

var (
buildCommit = "unknown"
buildVersion = "dev"
)

func main() {
plugin.Serve(&plugin.ServeOpts{ProviderFunc: megaport.Provider})
}

0 comments on commit 88cdb06

Please sign in to comment.