Skip to content

Commit

Permalink
Update goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
anttiviljami committed Aug 14, 2024
1 parent 21a68a5 commit 0d11282
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 28 deletions.
25 changes: 12 additions & 13 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
version: 2
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
Expand All @@ -10,33 +11,33 @@ builds:
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
- "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}"
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- "386"
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
binary: '{{ .ProjectName }}_v{{ .Version }}'
goarch: "386"
binary: "{{ .ProjectName }}_v{{ .Version }}"
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
- glob: "terraform-registry-manifest.json"
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
signs:
- artifacts: checksum
Expand All @@ -52,9 +53,7 @@ signs:
- "${artifact}"
release:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
- glob: "terraform-registry-manifest.json"
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
skip: true
18 changes: 18 additions & 0 deletions examples/resources/epilot-file_file-import/generated_resources.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# __generated__ by Terraform
# Please review these resources and move them into your main configuration files.

# __generated__ by Terraform from "91b9fd89-05ac-464d-8ac5-1379824471ac"
resource "epilot-file_file" "my_file" {
access_control = "private"
custom_download_url = null
filename = "8z87al.jpg"
mime_type = "image/jpeg"
s3ref = {
bucket = "epilot-dev-user-content"
key = "739224/69f04890-fa8d-4d2e-9347-4ac384da107b/8z87al.jpg"
}
source_url = "https://file.dev.sls.epilot.io/v1/files/public/links/739224-taqDBUyNjSX7c_n2v6Zvv/8z87al.jpg"
tags = null
title = "8z87al.jpg"
type = "image"
}
16 changes: 8 additions & 8 deletions examples/resources/epilot-file_file-import/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
# }

# epilot-file_file.my_file:
resource "epilot-file_file" "my_file" {
access_control = "private"
filename = "8z87al.jpg"
mime_type = "image/jpeg"
source_url = "https://file.dev.sls.epilot.io/v1/files/public/links/739224-taqDBUyNjSX7c_n2v6Zvv/8z87al.jpg"
title = "8z87al.jpg"
type = "image"
}
# resource "epilot-file_file" "my_file" {
# access_control = "private"
# filename = "8z87al.jpg"
# mime_type = "image/jpeg"
# source_url = "https://file.dev.sls.epilot.io/v1/files/public/links/739224-taqDBUyNjSX7c_n2v6Zvv/8z87al.jpg"
# title = "8z87al.jpg"
# type = "image"
# }
9 changes: 2 additions & 7 deletions examples/resources/epilot-file_file/resource.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
resource "epilot-file_file" "my_file" {
id = "ef7d985c-2385-44f4-9c71-ae06a52264f8"
title = "document.pdf"
access_control = "private"
custom_download_url = "https://some-api-url.com/download?file_id=123"
filename = "document.pdf"
mime_type = "application/pdf"
access_control = "private"
source_url = "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf"
type = "unknown"
}
}

0 comments on commit 0d11282

Please sign in to comment.