Skip to content

Commit

Permalink
update goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
dmdhrumilmistry committed Aug 28, 2024
1 parent 85aa083 commit 15b1230
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 28 deletions.
77 changes: 49 additions & 28 deletions src/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,68 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2
project_name: amass

before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
- go mod tidy
- go mod download

builds:
- env:
- CGO_ENABLED=0
main: ./src/cmd/offat/
-
main: ./cmd/offat/
binary: offat
goos:
- linux
- windows
- linux
- darwin
- freebsd
goarch:
- amd64
- 386
- arm
- arm64
ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: windows
goarch: 386
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
- goos: freebsd
goarch: arm

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
-
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- if eq .Arch "darwin" }}macos
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
wrap_in_directory: true
format: zip
files:
- LICENSE
- README.md

sboms:
- documents:
- "{{ .Binary }}_{{ .Os }}_{{ .Arch }}.bom.json"
artifacts: binary
cmd: cyclonedx-gomod
env:
- GOOS={{ .Os }}
- GOARCH={{ .Arch }}
args: [ "app", "-main", "cmd/offat", "-licenses", "-packages", "-json", "-output", "$document", "../" ]

checksum:
name_template: "{{ .ProjectName }}_checksums.txt"

changelog:
sort: asc
sort: desc
filters:
exclude:
- "^docs:"
- "^test:"
- '^MERGE'
- "{{ .Tag }}"
19 changes: 19 additions & 0 deletions src/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit 15b1230

Please sign in to comment.