Comments (3)
all that being said, I don't think we need to hard-integrate goreleaser with go-licenses... it's already possible to use it.
thanks for the issue, though!
from goreleaser.
you could run it in a before hook, and then archive the folder to add to the release...
e.g.:
# .goreleaser.yml
before:
hooks:
- go run github.com/google/go-licenses@latest save . --save_path="licenses"
archives:
- id: default
# ...
files:
# add to the default release archives
- ./licenses
# create an archive with licenses only
- id: licenses
name_template: licenses
format: tar.gz
meta: true
files:
- ./licenses
this should add a licenses.tar.gz
to the release artifacts...
if you want to add to the regular release archive, just add the ./dist/licenses
to its files section...
you might need to add the licenses
folder to the gitignore though
from goreleaser.
just tried it here, fwiw:
patch on goreleaser's own .goreleaser.yml
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 6559a447..ecb542e5 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -10,6 +10,7 @@ before:
- go mod tidy
- ./scripts/completions.sh
- ./scripts/manpages.sh
+ - go run github.com/google/go-licenses@latest save . --save_path="licenses"
snapshot:
name_template: "{{ incpatch .Version }}-next"
@@ -182,6 +183,13 @@ archives:
- LICENSE.md
- completions/*
- manpages/*
+ - licenses
+ - id: licenses
+ name_template: licenses
+ format: tar.gz
+ meta: true
+ files:
+ - licenses
brews:
- repository:
files after running goreleaser release --snapshot --clean
$ ls -1 dist/*.tar.gz
dist/goreleaser_Darwin_all.tar.gz
dist/goreleaser_Darwin_arm64.tar.gz
dist/goreleaser_Darwin_x86_64.tar.gz
dist/goreleaser_Linux_arm64.tar.gz
dist/goreleaser_Linux_armv7.tar.gz
dist/goreleaser_Linux_i386.tar.gz
dist/goreleaser_Linux_ppc64.tar.gz
dist/goreleaser_Linux_x86_64.tar.gz
dist/licenses.tar.gz
$ tar tvf dist/goreleaser_Linux_i386.tar.gz | grep licenses | wc -l
1375
from goreleaser.
Related Issues (20)
- winget on windows runner creates wrong PR HOT 1
- bug: Creating a tag on non-`main` branch and releasing will move the tag to `main` HOT 2
- build failing on arm v7 HOT 3
- Sign step fails with: `Non-interactive mode detected, using device flow.` HOT 2
- Termux: bad system call
- Split does not work with snapshot HOT 3
- snapcraft 8.2.x not working with goreleaser HOT 14
- Termux can't access internet because android don't allow to `/etc/resolv.conf` HOT 1
- Supports `tar.zst` as an archive format HOT 1
- Maximum SHA length in the changelog HOT 2
- What is needed for IPK support? HOT 1
- Support Github Artifact Attestations HOT 1
- Allow inline nfpm to build AIX rpms if/when that gets added HOT 1
- Draft release config is ignored for github release in latest version HOT 2
- Recommended to remove annoying thanks HOT 2
- allow to sign without notarizing
- Implement --auto-snapshot for build command too
- Generated Homebrew formulae incompatible with brew v4.3.1 HOT 1
- Prebuilt builder error `prebuilt not found in type config.Build` HOT 2
- Gitlab, Get default branch fails in Gitlab CI HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goreleaser.