After talking with @perylemke, we realized that probably most people
will likely expect it to be called --clean instead of --rm-dist, as its
more similar to the popular `make clean` task.
This adds the --clean flag, and make the --rm-dist one deprecated.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
continuing the PR by @developer-guy
- [x] should be a publisher, as it does publish the images it builds
every time
- [x] `Default` method does not work
- [x] the `fromConfig` thing should probably be on the defaults, too
- [x] wire `--skip-ko`
- [x] documentation
- [x] more tests
- [x] use same registry as docker tests does
- [ ] see if we can make the log output match goreleaser's
- [ ] ??
closes#2556closes#3490
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: actions-user <actions@github.com>
Co-authored-by: Jason Hall <jason@chainguard.dev>
Co-authored-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
To help solve this issue
```
apk:
signature:
key_file: "{{ .Env.ABUILD_KEY_NAME }}.rsa"
key_name: "{{ .Env.ABUILD_KEY_NAME }}"
```
<!--
Hi, thanks for contributing!
Please make sure you read our CONTRIBUTING guide.
Also, add tests and the respective documentation changes as well.
-->
<!-- If applied, this commit will... -->
Allow that the key_name in apk signature to be templated
<!-- Why is this change being made? -->
The name of the key might not be hardcoded, in a github workflow
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
...
This prevents one announce failure to skip all other announcers.
The release will still report a failure in the end, but will not fail in
the first failure.
Also improved errors messages a little bit.
closes#3663
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
with this patch, a config like:
```yaml
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
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
rlcp: true
files:
- src: "build/**/*"
dst: .
nfpms:
- package_name: foo
contents:
- src: "build/**/*"
dst: usr/share/foo
formats:
- apk
```
will eval this:
<img width="1384" alt="CleanShot 2022-12-21 at 22 21 00@2x"
src="https://user-images.githubusercontent.com/245435/209034244-7c31b5f7-cfcd-4825-bb2f-7dd463c5286a.png">
as much as I would like to make this the default, it would be a breaking
change, so we really can't do it.
If `dst` is empty, it'll have the same behavior as before (no rlcp), and
if `strip_parent` is set, it will also still have the same behavior.
Finally, if the format is binary, `rlcp` is ignored too (as it doesn't
make sense).
So, this only changes if:
- your format is not binary; and
- you have files with `src` and `dst` set
Then, goreleaser will warn you to set `rlcp: true`.
## todo
- [x] docs
- [x] more tests probably
- [x] any ideas for a better name for the new config option?
fixes#3655
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
GoReleaser evolved a lot since the last time I tried to implement this
>1 year ago.
Now its 100% possible, and way simpler to do it!
closes#3580
refs #2583
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
The replacements thing was always a bit weird, especially on archives.
We can solve that with templates, so, removing I'm deprecating it.
Also did the same on other places that had it the same feature.
Closes#3588
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
this use the digests on the manifest creation.
Another PR will add it to signing too.
refs #3496
refs #3540
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
this drives it home by using the actual images/manifest digests to sign
with cosign by default.
the default signing command is changing in this PR, but since `digest`
should be always there (if not, the pipeline will fail way earlier), it
should be fine.
refs https://github.com/goreleaser/goreleaser/issues/3496
refs https://github.com/goreleaser/goreleaser/pull/3540
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Following #3540, output artifacts' checksums to the artifact info.
This addition makes it easier to consume the checksums, especially when
running from e.g. GitHub Actions.
New tests:
1. Add a check for the checksum in the extra field.
2. Add a test for every checksum algorithm (to see that it doesn't break
for any algo's output).
3. Add a case of a binary and an extra file (to see that the logic
doesn't break when there's a mix).
p.s.
While working on that, I noticed that the convention for extra fields is
actually to use UpperCamelCase rather than lower.
I was mistaken because I looked at the subfields of the "DockerConfig"
extra field.
I think it's a good idea to fix it quickly, before the next release
rolls and it becomes a compatibility issue.
I took the liberty to fix it here as an extra commit. Please let me know
if you want it to be in a separate PR.
---
Tests:
```
go test
• refreshing checksums file=binary_bar_checksums.txt
• refreshing checksums file=binary_bar_checksums.txt
• refreshing checksums file=binary_bar_checksums.txt
PASS
ok github.com/goreleaser/goreleaser/internal/pipe/checksums 0.184s
```
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Extract the digest (sha256) of docker images from the `docker push`
command for dockers published to the docker registry.
Outputting the digest is required to avoid a race condition when
referencing the image, where the image tag is being modified before the
reference is done.
See this [blog
post](https://github.com/goreleaser/goreleaser/issues/3496) for more
info.
This PR fixes https://github.com/goreleaser/goreleaser/issues/3496.
Note that the 'publish' pipe now must run before the 'metadata' pipe, so
that the information extracted during the 'publish' pipe would appear in
the metadata.
Previously, the published docker images metadata wasn't printed (because
of the order). It made sense because the content of the published image
was just a subset of the local one.
Now that it is printed to the metadata, it should have a different name
to avoid confusion.
As I mentioned, it wasn't printed before - so there shouldn't be any
backward-compatibility issues.
---
Local tests:
```
go test -v .
=== RUN TestVersion
=== RUN TestVersion/only_version
=== RUN TestVersion/version_and_date
=== RUN TestVersion/version,_date,_built_by
=== RUN TestVersion/all_empty
=== RUN TestVersion/complete
--- PASS: TestVersion (0.00s)
--- PASS: TestVersion/only_version (0.00s)
--- PASS: TestVersion/version_and_date (0.00s)
--- PASS: TestVersion/version,_date,_built_by (0.00s)
--- PASS: TestVersion/all_empty (0.00s)
--- PASS: TestVersion/complete (0.00s)
PASS
ok github.com/goreleaser/goreleaser 0.764s
```
Output example:
```
{
"name": "gallegit/hello-world:latest",
"path": "gallegit/hello-world:latest",
"goos": "linux",
"goarch": "amd64",
"internal_type": 10,
"type": "Published Docker Image",
"extra": {
"digest": "sha256:c3f7dd196a046dc061236d3c6ae1e2946269e90da30b0a959240ca799750e632"
}
}
```
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This PR adds support for generating the structure used to pack and push
Chocolatey Packages. And will solve the #3154
Is not ready for merge yet, but has the main structure, and ready for
comments.
Accordingly to Chocolatey, in order to build a package, it's necessary a
`.nuspec` and `chocolateyinstall.ps1` files at least, having these ones,
we could pack and distribute without adding the binary inside the final
package and that was implemented here.
To complete, will be necessary to define the package build and
distribute, however will be required to have Chocolatey installed
(Windows Only). One of alternatives that I thought was, publish the
files like Scoop and Brew in a separate repository, and there we could
use `chocolatey` through
[crazy-max/ghaction-chocolatey](https://github.com/crazy-max/ghaction-chocolatey).
Chocolatey has a lot of good examples of repositories:
https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/curl
A final compilation of the missing parts:
- [x] How to pack and push (chocolatey)
- [x] Documentation
Sorry for the long description😄
All feedback very welcome!
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
<!--
Hi, thanks for contributing!
Please make sure you read our CONTRIBUTING guide.
Also, add tests and the respective documentation changes as well.
-->
<!-- If applied, this commit will... -->
This PR improves the handling of shared or static libraries by
GoReleaser. It uses the default behaviour of the Go compiler by
appending the right extension to libraries.
* `.so` and `.a` for Linux shared libraries and static libraries
respectively
* `.dylib` and `.a.` on Darwin
* `.dll` and `.lib` on Windows (pre-existent)
It does not add any configuration option to `.goreleaser.yml`, since it
leverages the existing `buildmode` flag.
Additionally, this PR takes care of adding the generated header file
into the archive.
<!-- Why is this change being made? -->
Personally I would leverage this change to release some software both as
a CLI and as a shared library. I believe others who use CGo or need
interoperability with Go from other languages could benefit from this.
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
This was previously discussed in #3497.
I couldn't quite think of a proper way to add some tests to the header
archiving feature. Any recommendation?
Fix the regular expressions used in changelog group processing to valid
golang (RE2) regexps. These previously used PCRE character class `\w`
which is not supported in RE2 which is what golang regexp uses.
Also document that format matches not just title as some may thing but
the format `<abbrev-commit> <title-commit>`.
<!--
Hi, thanks for contributing!
Please make sure you read our CONTRIBUTING guide.
Also, add tests and the respective documentation changes as well.
-->
<!-- If applied, this commit will... -->
This PR implements the Archlinux packages that were added in nfpm
v2.20.0, as well as tests and documentation for them.
<!-- Why is this change being made? -->
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
goreleaser/nfpm#133
goreleaser/nfpm#543
Fixes#3469
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
closes#3508
- adds template support for krew and scoop repo refs
- template branch on reporef on brew as well
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This PR will truncate any trailing slash left by specifying only a Gitea
API URL.
Fixes#3487
I have not added any tests for this.
Signed-off-by: Sam Therapy <sam@samtherapy.net>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
<!--
Hi, thanks for contributing!
Please make sure you read our CONTRIBUTING guide.
Also, add tests and the respective documentation changes as well.
-->
<!-- If applied, this commit will... -->
This PR upgrades nFPM to v0.20.0, and integrates the new
`ConventionalExtension` method to use the correct extension for the
packaging format that is being used.
<!-- Why is this change being made? -->
Currently, goreleaser uses the name of the format to determine the
extension. This has worked fine, but with the introduction of Archlinux
packages, goreleaser has to handle packages with extensions that don't
match the name of the format, since Archlinux uses `.pkg.tar.zst` as the
extension.
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
goreleaser/nfpm#546goreleaser/nfpm#543
Jailbroken iOS can install deb packages, and it seems the only change
needed is to set the OS to `ios` instead of `linux`.
Closes#3410
cc/ @blacktop
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Set MarkdownV2 as parse mode for Telegram announcer.
This allows for additional formatting in the announcement, such as
`code` or _italic_ sections. For details, see the official [Telegram Bot
API](https://core.telegram.org/bots/api#markdownv2-style).
If someone has the time (not added in this PR), I think it would be
great to add a field to the Telegram config for the parse mode. This
would allow setting a different parse mode than MarkdownV2, such as
HTML.
This fixes#3431.
this allows the user to specify the abbrev lenght to use, and will also add the option to omit the commit hash altogether by setting it to -1.
default is doing nothing
closes#3348
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
`--add-file` adds only the `--prefix` joined with the basename of the added file, so, adding a folder like `vendor` would break havoc.
this basically writes our own source archives (which are more compressed) and allows to add an entire folder easily, as well as other mappings as `archives` already supports.
refs #3102#2911
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Bumps [github.com/caarlos0/env/v6](https://github.com/caarlos0/env) from 6.9.3 to 6.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/caarlos0/env/releases">github.com/caarlos0/env/v6's releases</a>.</em></p>
<blockquote>
<h2>v6.10.0</h2>
<h2>Changelog</h2>
<h3>New Features</h3>
<ul>
<li>69c7b5a1dc8b2c4e78a7211aef3fd102333e4e4f: feat: aggregate validation errors (<a href="https://github-redirect.dependabot.com/caarlos0/env/issues/233">#233</a>) (<a href="https://github.com/akutuev"><code>@akutuev</code></a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>439dbad60f367bc1995f066cf9127743d468a572: fix: RequiredIfNoDef with nested structs (<a href="https://github-redirect.dependabot.com/caarlos0/env/issues/229">#229</a>) (<a href="https://github.com/HarmlessEvil"><code>@HarmlessEvil</code></a>)</li>
</ul>
<h3>Documentation updates</h3>
<ul>
<li>60b5226da3e5e4ca3dcb795b8416f30c5cb2c5a9: docs: broken link (<a href="https://github.com/caarlos0"><code>@caarlos0</code></a>)</li>
<li>4c93d81012635da80954a1b3ec2e30566aa1b9d9: docs: remove duplicate <code>string</code> (<a href="https://github-redirect.dependabot.com/caarlos0/env/issues/232">#232</a>) (<a href="https://github.com/dacapoday"><code>@dacapoday</code></a>)</li>
</ul>
<hr />
<p><em>Released with <a href="https://goreleaser.com/pro">GoReleaser Pro</a>!</em></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="69c7b5a1dc"><code>69c7b5a</code></a> feat: aggregate validation errors (<a href="https://github-redirect.dependabot.com/caarlos0/env/issues/233">#233</a>)</li>
<li><a href="4c93d81012"><code>4c93d81</code></a> docs: remove duplicate <code>string</code> (<a href="https://github-redirect.dependabot.com/caarlos0/env/issues/232">#232</a>)</li>
<li><a href="60b5226da3"><code>60b5226</code></a> docs: broken link</li>
<li><a href="1917ee3bb3"><code>1917ee3</code></a> chore(build): makefile</li>
<li><a href="439dbad60f"><code>439dbad</code></a> fix: RequiredIfNoDef with nested structs (<a href="https://github-redirect.dependabot.com/caarlos0/env/issues/229">#229</a>)</li>
<li>See full diff in <a href="https://github.com/caarlos0/env/compare/v6.9.3...v6.10.0">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/caarlos0/env/v6&package-manager=go_modules&previous-version=6.9.3&new-version=6.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos A Becker <caarlos0@users.noreply.github.com>
termux support, built from #3258 :
minor code changes
support for 386 as well
docs
tests
closes#3118closes#3258
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: rsteube <rsteube@users.noreply.github.com>
* feat: add version for homebrew dependencies
* resolve conflicts
* resolve conflicts
* feat: allow to specify version of brew deps
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: brew
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Purushotham <purushotham@hasura.io>
* fix: eventual race condition in artifacts
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: locks
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: remove gofish
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: remove more unused code
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: remove more references
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: strip_parent_binary_folder
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: clarify dir
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: fmt
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
It seems that the error I get sometimes (#3257) is related to snap push
not being able to work concurrently.
I'm not a 100% sure though, so I'll try this and see how it goes.
If the error still happens, we can ignore the error or retry.
closes#3257
* fix: brew style
closes#3236
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: more fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: more fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat(ci): compile with go 1.19
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fixing template test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: improve check
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: more test and docs fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fix
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fix
* test: fix
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: docker templates
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: godoc for RequireTemplateError
* Trying to fix parallelism on multiple builds issue
https://github.com/goreleaser/goreleaser/issues/3209
* bugfixing
* Update internal/pipe/build/build_test.go
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* Update internal/pipe/build/build_test.go
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* Update internal/pipe/build/build_test.go
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: gofumpt
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: JD <jdpcbs@gmail.com>
* feat: allow to override env for a target
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: dupe key
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This changes the changelog grouping feature a bit: it evaluates the
groups in the order they are declared in the config file, but renders
them following their `order` attribute.
This allows to have better filters, for instance, you might want to have
dependabot commits in another section, which does not need a high
priority in the changelog output, but does when evaluating, as it might
share the words with other groups: in goreleaser's case, the `feat`
prefix.
Giving that Go's regex seems to don't allow negative look-aheads (which
would help in this particular case), this seems like a good quality of
life improvement.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: allow to template release.repo
this will allow to use templates in the release.github/gitea/gitlab owner and name fields.
closes#3202
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: allow to template release.repo
this will allow to use templates in the release.github/gitea/gitlab owner and name fields.
closes#3202
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* refactor: improve handling of extra fields in artifacts
Backporting from pro: with this we can parse the artifacts list from
json into the context and use them again.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fix
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: added --skip-before flag
this would allow to skip global before hooks
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: skip docker test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Allow to skip the entire docker images and manifests builds.
Might be useful for faster local builds et al.
closes#3144
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* refactory: improve cmd code
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: improve time reporting
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: improve artifacts json
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: improve artifacts json
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: diffs
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: improve root cmd help
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: replacing logs
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests et al
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: update termenv/lipgloss
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* wip: output
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: pin dep
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: update
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: deps
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: dep
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: remove empty_folders for good
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: build
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
It was saying it should not be used anymore, while it is actually the
other way around: it should always be set.
closes#3124
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* refactor: evaluate archive files in another package
would be used in #2911
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
basically allows to use goreleaser against a repo with a git url without both owner and repo name.
closes#3060closes#3058
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: improve docker errors
Adding an error page with some more info to help debug issues.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: forgot return
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: missing err
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
- on universal binaries, use the build id instead of the binary name to
create the folder in the dist folder
- on builds, default the id the to the binary name instead of project
name. The binary name already defaults to the project id if empty, so
this should only prevent having to specify the id + binary name in
some cases.
closes#3061
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: custom targets if missing goamd64, goarm, gomips
if the user provide custom targets without the goamd64, goarm or gomips bit, things may go awry at some point.
this prevents issues by suffixing them with the default when its missing.
closes https://github.com/goreleaser/goreleaser/issues/3055
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: fix build tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: archive ids
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: add archive id filter test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: nfpm lintian concurrency issue
Several goroutines might touch the lintian file inside dist at the same
time, which might cause weird errors, namely `archive/tar: write too long`.
This PR fixes it by namespacing the file to the package name + arch,
so one goroutine won't touch the work of the other.
It also improves some logs and tests.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: linter issues
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
It was just allowing v2 and v3 due to some misreading on my side.
This commit fixes it to allow v1, v2, v3 and v4.
refs #3016
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: tmpl snap fields
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* added tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: broken test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: deprecate gofish
gofish was deprecated by its authors, this deprecates it here too
refs https://github.com/goreleaser/goreleaser/discussions/2998
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: do not publish rig anymore
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: remove install
* chore: deprecate
* fix(gofish): fix broke logs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat(announce): added Slack notification options
This feature adds support for specifying a richer content in Slack
announcements. We may now specify "blocks" and "attachments" to produce
better-looking announcement messages.
* fixes#2986
The goreleaser configuration only exposes the top-level structures and does not
check the validity of the Slack API internal structures. This way, we do
not inject hard dependencies on changes in the Slack API.
Notice: untyped config parsing introduces a little hack to have yaml and
JSON marshaling work together properly. This hack won't be necessary
with yaml.v3.
How this has been tested?
-------------------------
* Added unit tests for the config parsing
* Added a (skipped) e2e test.
For now, this requires a valid Slack webhook, so I've been able to test this manually.
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
* added more unit tests
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
* removed yaml.v2 hack
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
this allows to set the -mod flag on the command used to grab the module
root package, in case its needed to ignore the vendor folder, force
readonly, etc...
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: more go 1.18
moved more workflows to go 1.18, switched some code to strings.Cut
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* revert unwanted change
properly indent brews.post_install block, and also fix indent on newly
added brews.service block.
closes#2980
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
The nfpm pipe was globbing the input list, and then globbing its result
as well. If you add a folder that had a file with, say `[]`, in it, it
would later fail the release upon trying to evaluate that as a glob.
This is probably some faulty nFPM update in which I should have removed
that but didn't.
Either way, this should fix it.
closes#2946
Currently on a M1 macbook when adding a tap with formulas that only support amd64 it fails to add the tap. This prevents new arm64 users from using the tap. By allowing arm64 users to install an amd64 binary if no arm64 binary is avialable will atleast allow the user to use the tap.
* fiX: improve aur key handling
make sure it has the right permissions and improve error messages
refs https://github.com/goreleaser/goreleaser-action/issues/326
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: improve error msgs, make sure file is closed
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
I had this issue on a repo, and it seems at least one more person had it too: ssh/git complaining that the key is invalid.
My guess is that gh secret set from a file is now appending a new line - as it worked with the exact same key before, for me at least.
anyway, if thats it, this pr should fix it.
closes https://github.com/goreleaser/goreleaser-action/issues/326
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: annotated tag body
this adds another template variable, `TagBody`, with the body of the annotated tag/commit message only.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: tag contents
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
/usr/local/bin is intended for binaries compiled locally, which is never
the case for goreleaser.
this changes the default to /usr/bin instead.
closes#2909
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: lintian overrides
allow to more easily set lintian overrides
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lintian
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to use .Path and .Name on universal binary post hooks
This allows the usage of `{{ .Path }}` and `{{ .Name }}` on post
templates.
Closes#2890
* docs: improve docs
* test: add more tests
* fix: make --release-notes flags more deterministic
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
all other logs print relative paths, only the build logs are printing the abs path.
this makes things more even.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to override build flags by goos/goarch/etc
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: improve
* fix: typos
* feat: templates, merges
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: one more case
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* Update internal/builders/golang/build.go
Co-authored-by: Brian Flad <bflad417@gmail.com>
* Update internal/builders/golang/build.go
Co-authored-by: Brian Flad <bflad417@gmail.com>
* test: more tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
Co-authored-by: Brian Flad <bflad417@gmail.com>
* feat: expose runtime goos and goarch on templates and metadata
* test: fix duplicated map literal in some os/arch
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix(aur): version must be numbers only
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: format
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: revert removed line
* feat: write a dist/metadata.json
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: comments
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: added one more test
* feat: aur PKGBUILD integration
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: guess install, improve formatting
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: more deterministic
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: binary releases, push, more tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: accept key as text
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: improvements
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: srcinfo
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: compile
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: everything
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: renames, docs, etc
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: link to docs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: go mod tidy, title
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: srcinfo tmpl
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: missing close quote
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: templates
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: always defaults conflicts and provides
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: ssh command
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: maintainers can be a list
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: ensure -bin suffix, more tests and docs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: this will never happen
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: whitespaces
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: goreleaser config
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: rename file
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: template main with gomod.proxy
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to template commit author
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: do not filter and sort github-native
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: improve code a bit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: improve code a bit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: changelog header
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to template dockerfile
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: added one more test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
The Github changelog generation API returns a pre-formatted changelog. The
current implementation prefixes every line of that log with "* ". This operation
breaks the formatting.
This change makes goreleaser treat github-native changelog as-is, without
trying to modify it.