1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00
Commit Graph

873 Commits

Author SHA1 Message Date
Kamesh Sampath
f22987a026
fix: honouring ko bare option (#3743)
The commit will add the `bare` option to ko publisher options when
set/passed via config `.goreleaser.yaml`.

Currently, even the `bare: true` is set via config, the option was never
passed to `ko` PublisherOptions.

#3742

---------

Co-authored-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2023-02-01 19:46:38 -03:00
Carlos Alexandro Becker
4954815ae4
fix: improve handling of --rm-dist deprecation (#3728)
- improved how we handle `--rm-dist` deprecation so it looks more like
other deprecations
- improved deprecation error message a bit as well

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-29 00:24:11 -03:00
Carlos Alexandro Becker
90a82157ca
refactor: improve tmpls that eval to a bool (#3726)
- added a tmpl.Bool that checks if the result of a template is "true"
- added an ErrSkipper interface so Skip() methods can return errors as well

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-28 23:21:43 -03:00
Carlos Alexandro Becker
caaf9973ee
fix: only debs should create iphoneos pkgs (#3719)
problem was made evident in the last nfpm update... this should fix it.

refs #3715

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-25 15:10:17 -03:00
Carlos Alexandro Becker
afc38b79a9
feat: allow to template release.disable and releaser.skip_upload (#3710)
closes https://github.com/goreleaser/goreleaser/issues/3705

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-23 22:27:01 -03:00
Carlos Alexandro Becker
d386cbf3ce
feat: allow to template snaps.grade (#3712)
refs
d73320559b

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-23 22:05:24 -03:00
Carlos Alexandro Becker
c42b3ec6af
refactor: improve go mod proxy usage (#3698)
Thanks for the suggestions @mvdan!

refs https://github.com/goreleaser/goreleaser/issues/3624

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-20 23:47:20 -03:00
Carlos Alexandro Becker
d18adfb57e
feat: deprecate --rm-dist in favor of new --clean flag (#3702)
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>
2023-01-20 23:47:08 -03:00
Carlos Alexandro Becker
2450746e5c
feat: add ko support (#3653)
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 #2556
closes #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>
2023-01-16 22:34:49 -03:00
Carlos A Becker
c747445d0b
test: apk key name template
refs #3667

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-11 09:14:03 -03:00
Kalle Møller
1b7dd258ce
feat: allow to template apk keyname (#3667)
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
-->

...
2023-01-11 09:10:31 -03:00
Carlos A Becker
af38a4c6d3
fix: toslash artifact paths on metadata.json
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-10 22:24:35 -03:00
Carlos A Becker
8e3567ed0a
refactor: rename ChangeLogGroup to ChangelogGroup
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-07 18:37:44 -03:00
Carlos A Becker
a1477f9370
refactor: improve changelog code
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-07 18:33:15 -03:00
Carlos Alexandro Becker
82be112be1
feat: allow to template telegram.chat_id (#3686)
closes #3682

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-07 17:20:11 -03:00
Carlos A Becker
ad40cb0349
refactor: improve mergeability 2022-12-30 22:57:24 -03:00
Carlos Alexandro Becker
bd98343e4b
fix: improve changelog a bit (#3673)
revert a bit of the changes made in #3668 to improve mergeability with
pro.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-29 14:07:23 -03:00
Carlos Alexandro Becker
da2335791a
fix: native changeloger without previous tag (#3668)
closes #3662

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-29 10:41:59 -03:00
Carlos Alexandro Becker
47ce9a9b33
fix: only fail announcing phase in the end (#3666)
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>
2022-12-28 12:24:21 -03:00
Carlos Alexandro Becker
1d2842c419
fix: log which token will be used (#3665)
this just helps debugging issues like #3661

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-28 10:27:17 -03:00
Carlos Alexandro Becker
a209757ad2
feat: better archives relative paths (#3656)
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>
2022-12-27 17:42:55 -03:00
Carlos A Becker
494ba29267
fix: lint issue
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-21 01:07:07 -03:00
Carlos A Becker
d4b570a002
fix: clarify scoop no windows archive errors
closes #3648

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-18 16:49:55 -03:00
dependabot[bot]
691234d402
feat(deps): bump github.com/atc0005/go-teams-notify/v2 from 2.6.1 to 2.7.0 (#3638)
Bumps
[github.com/atc0005/go-teams-notify/v2](https://github.com/atc0005/go-teams-notify)
from 2.6.1 to 2.7.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/atc0005/go-teams-notify/releases">github.com/atc0005/go-teams-notify/v2's
releases</a>.</em></p>
<blockquote>
<h2>v2.7.0</h2>
<h2>Added</h2>
<ul>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/134">GH-134</a>)
Allow setting user agent, fallback to project-specific default
value</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/135">GH-135</a>)
Allow overriding default <code>http.Client</code></li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/157">GH-157</a>)
Add <code>Adaptive Card</code> message format support
<ul>
<li>see also discussion from <a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/127">GH-127</a>,
including feedback from
<a href="https://github.com/ghokun"><code>@​ghokun</code></a></li>
</ul>
</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/169">GH-169</a>)
Added YAML en(de)coding support to <code>MessageCard</code>
<ul>
<li>credit: <a
href="https://github.com/pcanilho"><code>@​pcanilho</code></a></li>
</ul>
</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Dependencies
<ul>
<li><code>github.com/stretchr/testify</code>
<ul>
<li><code>v1.7.0</code> to <code>v1.8.1</code></li>
</ul>
</li>
</ul>
</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/154">GH-154</a>)
Deprecate API interface, expose underlying &quot;Teams&quot; client</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/183">GH-183</a>)
Update Makefile and GitHub Actions Workflows</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/190">GH-190</a>)
Refactor GitHub Actions workflows to import logic</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/166">GH-166</a>)
Update <code>lintinstall</code> Makefile recipe</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/184">GH-184</a>)
Apply Go 1.19 specific doc comments linting fixes</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/176">GH-176</a>)
<code>./send_test.go:238:8: second argument to errors.As should not be
*error</code></li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/179">GH-179</a>)
Wrong json key name for URL (uses uri instead)
<ul>
<li>credit: <a
href="https://github.com/janfonas"><code>@​janfonas</code></a></li>
</ul>
</li>
</ul>
<h2>References</h2>
<ul>
<li>See the <a
href="https://github.com/atc0005/go-teams-notify/milestone/11?closed=1"><code>v2.7.0</code>
milestone</a> for the issues associated with this release.</li>
<li>See our <a
href="https://github.com/atc0005/go-teams-notify/blob/master/CHANGELOG.md">CHANGELOG</a>
for more information.</li>
</ul>
<h2>v2.7.0-rc.2</h2>
<h2>WARNING</h2>
<p>This is a release candidate (RC) release. Unless issues are
discovered &amp; reported, this will become the next v2.7.0 stable
release.</p>
<p>Please test and provide feedback so that any blocking issues can be
resolved before the v2.7.0 release.</p>
<p>Thanks in advance!</p>
<h2>Changes for the <code>v2.7.0-rc.2</code> release</h2>
<ul>
<li>dependency updates</li>
<li>CI tweaks/enhancements</li>
</ul>
<h2>Changes for the <code>v2.7.0-rc.1</code> release</h2>
<ul>
<li>Go 1.19 specific linting fixes</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/atc0005/go-teams-notify/blob/master/CHANGELOG.md">github.com/atc0005/go-teams-notify/v2's
changelog</a>.</em></p>
<blockquote>
<h2>[v2.7.0] - 2022-12-12</h2>
<h3>Added</h3>
<ul>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/134">GH-134</a>)
Allow setting user agent, fallback to project-specific default
value</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/135">GH-135</a>)
Allow overriding default <code>http.Client</code></li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/157">GH-157</a>)
Add <code>Adaptive Card</code> message format support
<ul>
<li>see also discussion from <a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/127">GH-127</a>,
including feedback from
<a href="https://github.com/ghokun"><code>@​ghokun</code></a></li>
</ul>
</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/169">GH-169</a>)
Added YAML en(de)coding support to <code>MessageCard</code>
<ul>
<li>credit: <a
href="https://github.com/pcanilho"><code>@​pcanilho</code></a></li>
</ul>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Dependencies
<ul>
<li><code>github.com/stretchr/testify</code>
<ul>
<li><code>v1.7.0</code> to <code>v1.8.1</code></li>
</ul>
</li>
</ul>
</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/154">GH-154</a>)
Deprecate API interface, expose underlying &quot;Teams&quot; client</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/183">GH-183</a>)
Update Makefile and GitHub Actions Workflows</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/190">GH-190</a>)
Refactor GitHub Actions workflows to import logic</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/166">GH-166</a>)
Update <code>lintinstall</code> Makefile recipe</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/184">GH-184</a>)
Apply Go 1.19 specific doc comments linting fixes</li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/176">GH-176</a>)
<code>./send_test.go:238:8: second argument to errors.As should not be
*error</code></li>
<li>(<a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/179">GH-179</a>)
Wrong json key name for URL (uses uri instead)
<ul>
<li>credit: <a
href="https://github.com/janfonas"><code>@​janfonas</code></a></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c205f3b9c9"><code>c205f3b</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/195">#195</a>
from atc0005/update-changelog-for-v2.7.0-release</li>
<li><a
href="8ea4c384a6"><code>8ea4c38</code></a>
Update CHANGELOG for v2.7.0 release</li>
<li><a
href="76cdfd663d"><code>76cdfd6</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/191">#191</a>
from atc0005/dependabot/go_modules/master/github.com/...</li>
<li><a
href="0ae634df2e"><code>0ae634d</code></a>
go.mod: bump github.com/stretchr/testify from 1.8.0 to 1.8.1</li>
<li><a
href="dece5c5e6f"><code>dece5c5</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/190">#190</a>
from atc0005/ghaw-refactor</li>
<li><a
href="00f3f9dc82"><code>00f3f9d</code></a>
Refactor GitHub Actions workflows to import logic</li>
<li><a
href="8524906f8a"><code>8524906</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/189">#189</a>
from atc0005/dependabot/github_actions/master/github/...</li>
<li><a
href="10f4c0e5f9"><code>10f4c0e</code></a>
ghaw: bump github/codeql-action from 2.1.24 to 2.1.25</li>
<li><a
href="bf0a4f6096"><code>bf0a4f6</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/atc0005/go-teams-notify/issues/188">#188</a>
from atc0005/dependabot/github_actions/master/github/...</li>
<li><a
href="81f64b7826"><code>81f64b7</code></a>
ghaw: bump github/codeql-action from 2.1.23 to 2.1.24</li>
<li>Additional commits viewable in <a
href="https://github.com/atc0005/go-teams-notify/compare/v2.6.1...v2.7.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/atc0005/go-teams-notify/v2&package-manager=go_modules&previous-version=2.6.1&new-version=2.7.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>
2022-12-15 14:19:31 -03:00
Carlos Alexandro Becker
0767ded0cd
refactor: improving minio and docker tests (#3642)
using ory/dockertest to simplify integration tests

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-15 10:25:52 -03:00
Carlos Alexandro Becker
937067697b
feat: set file info for binaries inside archives (#3618)
closes #3582

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-14 12:16:03 -03:00
Carlos Alexandro Becker
f5696d01ee
feat: custom tag.sort (#3611)
closes #3609

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-02 21:50:04 -03:00
Carlos A Becker
a3d3ab2058
fix: improve docker warning 2022-11-30 22:47:53 -03:00
Carlos A Becker
7242733140
test: fix nfpm tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-29 21:59:38 -03:00
Carlos A Becker
6ff89366ca
fix: improve nfpm error
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-29 08:13:53 -03:00
Carlos A Becker
7ab711d682
test: fixed some tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-28 22:42:29 -03:00
Carlos Alexandro Becker
c2adc1727f
fix: missing digests on manifests (#3602)
it was missing the digest parsing for the manifest, and there were no
tests covering it.

now the tests are there, and so is the fix.

refs #3599
2022-11-28 21:30:16 -03:00
Carlos A Becker
f05f3b5b7f
fix: merge issues 2022-11-28 14:28:38 -03:00
Carlos Alexandro Becker
1b8395d6b6
feat(build): allow to template env (#3592)
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>
2022-11-25 15:26:29 -03:00
Carlos Alexandro Becker
e54656438b
feat: deprecate replacements (#3589)
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>
2022-11-25 15:26:14 -03:00
Carlos Alexandro Becker
541e3dfed9
feat(brew): allow to template brew.install (#3593) 2022-11-25 09:32:43 -03:00
John Olheiser
b66568529d
feat: add windows to default builds (#3581)
Resolves #3579

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-11-24 15:48:37 -03:00
Carlos Alexandro Becker
ab08d0b706
fix: move mastodon server to yaml (#3568)
refs #3567

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-17 20:54:57 -03:00
John Olheiser
e65c53172e
feat: add mastodon (#3567)
This PR adds [mastodon](https://joinmastodon.org/) as an announcement
pipeline. 🥳


![mastodon-announce](https://user-images.githubusercontent.com/42128690/202544345-d90d8f10-0818-4bc2-bc35-3dbcba4254b0.png)


Resolves #3566

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-11-17 20:40:00 -03:00
Carlos A Becker
8ef1d4339b
test: fix docker test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-17 20:39:21 -03:00
Carlos A Becker
1a9209eb1f
fix: log missing image name
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-15 08:59:18 -03:00
Carlos A Becker
096c6ba6b2
fix: variable name 2022-11-15 08:31:21 -03:00
Carlos A Becker
33ea55b8e6
refactor: use the variable from artifact
refs #3496

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-15 08:29:01 -03:00
Carlos Alexandro Becker
4863781b48
feat: use digest on manifests (#3555)
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>
2022-11-15 08:21:28 -03:00
Carlos Alexandro Becker
b55b9976c7
feat: use digest to sign docker images/manifests (#3556)
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>
2022-11-15 08:21:18 -03:00
Carlos Alexandro Becker
5ca4a7d2ff
fix: log when no artifacts are found for docker (#3554)
refs #3545

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-14 14:49:49 -03:00
gal-legit
76dc0b559e
feat: output checksums to artifacts info (#3548)
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>
2022-11-14 14:49:34 -03:00
Carlos A Becker
6df90e578a
test: fix defaults test 2022-11-14 14:00:12 -03:00
Carlos Alexandro Becker
bb00edac2a
fix: set dockers.goarm to 6 by default (#3552)
fixes #3545

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-14 13:59:01 -03:00
Carlos A Becker
e1ab1049ed
test: fix broken test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-12 17:57:02 -03:00
Carlos A Becker
e8c0f578b5
test: improve test stability
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-12 15:44:26 -03:00
gal-legit
5eb1e4ad0d
feat: add digest to artifacts info of published docker images (#3540)
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>
2022-11-12 14:51:53 -03:00
Carlos Alexandro Becker
778f099a9a
fix: improve artifactory error handling (#3546)
closes #3543

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-12 00:49:08 -03:00
Fabio Ribeiro
f2281e8ff2
feat: chocolatey support (#3509)
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>
2022-11-11 23:52:32 -03:00
Carlos A Becker
22a7a9a835
refactor: small improvements
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-11 23:42:52 -03:00
Giorgio Azzinnaro
0a536f08fd
feat: build of shared/static libraries (#3511)
<!--

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?
2022-11-11 23:35:51 -03:00
Steven Hartland
0ea4f1d5b7
fix(changelog): group regexps (#3527)
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>`.
2022-11-07 09:28:52 -03:00
Carlos A Becker
129c23f2d9
test: fix scm test on forks
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-04 16:02:33 -03:00
Carlos A Becker
4f2c0ce34a
test: skip sbom tests locally if not syft
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-04 16:00:29 -03:00
Arsen6331
ad359a4712
feat: implement nfpm archlinux packages (#3470)
<!--

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>
2022-11-02 15:30:06 -03:00
Carlos Alexandro Becker
1a69d44d6d
fix: allow to template scoop/brew/krew repo ref (#3521)
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>
2022-11-02 14:54:16 -03:00
Carlos A Becker
f2f72a57e3
test: gitea with trailing slash 2022-10-21 22:53:24 -03:00
Sam Therapy
154c520755
fix: Trim trailing slash from Gitea URL (#3488)
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>
2022-10-21 22:42:19 -03:00
Carlos A Becker
f90df0f5ec
fix: getting previous tag
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-10-17 22:39:32 -03:00
Carlos Alexandro Becker
27cbbd8e66
fix: change publishers order a bit (#3473)
closes https://github.com/goreleaser/goreleaser/discussions/3472
2022-10-17 21:19:11 -03:00
Arsen6331
f6eb51cb9c
feat: integrate ConventionalExtension from nfpm v2.20.0 (#3468)
<!--

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#546
goreleaser/nfpm#543
2022-10-15 16:57:39 -03:00
Carlos Alexandro Becker
9e6fb4f55c
feat: more templateable fields for blobs (#3461)
closes #3460

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-10-14 10:17:30 -03:00
Carlos Alexandro Becker
2b0bdffb3e
refactor: making it easier to merge with pro (#3463)
this improves mergeability between pro and oss a bit

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-10-14 00:31:05 -03:00
Carlos Alexandro Becker
080ccff8db
feat: nfpm for ios (#3436)
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>
2022-10-12 21:24:39 -03:00
Carlos A Becker
d88600aca7
fix: revert unwanted change in docker.go
refs #3414
2022-10-05 11:12:50 -03:00
Carlos Alexandro Becker
a42c8ae706
feat: aur backup (#3366)
closes #3353
2022-10-05 09:42:17 -03:00
Carlos Alexandro Becker
24178b1060
feat: permanently remove buildpacks (#3414)
removing for good!

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-10-05 09:42:05 -03:00
NoahK
81de8addf1
feat: MarkdownV2 for Telegram announcer (#3435)
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.
2022-10-05 09:35:01 -03:00
Carlos Alexandro Becker
4a51099964
fix: gomod.env not being used (#3434)
Fixes  #3426

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-10-04 13:01:18 -03:00
Carlos Alexandro Becker
d7cf3dd889
docs: update nfpm docs (#3396)
closes #3380

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-24 22:42:30 -03:00
Carlos A Becker
e9a54ce40b
test: fixed a broken test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-18 14:21:33 -03:00
Carlos A Becker
91c6f75b8f
chore: ign linter warning
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-17 00:14:59 -03:00
Carlos Alexandro Becker
c1965923b0
docs: improve wording/formatting in several places (#3384)
this just improves docs wording and formatting in several places.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-17 00:13:09 -03:00
Carlos Alexandro Becker
36a48eabb7
fix: binary archive when multiple builds (#3385)
closes #3383

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-16 23:47:06 -03:00
Carlos Alexandro Becker
707747db3b
fix: print release url after publishing it (#3374)
very small improvement, but useful nevertheless

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-13 23:52:54 -03:00
Carlos Alexandro Becker
8cb4eb1654
fix: ruleguard and semgrep scans and fixes (#3364)
run semgrep-go ruleguard and semgrep scans

https://github.com/dgryski/semgrep-go

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-11 15:32:23 -03:00
Carlos Alexandro Becker
2244bba1e0
fix: templates in release URLs (#3365)
closes #3356

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-11 14:28:50 -03:00
Carlos Alexandro Becker
efdba10f58
fix: guard changelog commit abbrev behind config (#3349)
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>
2022-08-30 12:04:01 -03:00
Carlos Alexandro Becker
d7acf21f03
fix: source archive add subfolders (#3343)
`--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>
2022-08-25 02:15:37 -03:00
Carlos Alexandro Becker
e67975ea99
feat: add extra files to source archives (#3102)
closes https://github.com/goreleaser/goreleaser/issues/2911

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-25 01:10:26 -03:00
dependabot[bot]
7ed4197f51
feat(deps): bump github.com/caarlos0/env/v6 from 6.9.3 to 6.10.0 (#3338)
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>
2022-08-25 01:08:00 -03:00
Carlos Alexandro Becker
a7c6b14cbf
feat: termux.deb (#3333)
termux support, built from #3258 :

minor code changes
support for 386 as well
docs
tests

closes #3118
closes #3258

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: rsteube <rsteube@users.noreply.github.com>
2022-08-22 09:29:55 -03:00
ToπSenpai
6183c3f030
feat(deps): update discord webhook library (#3320)
This commit will update the discord webhook library. I deprecated https://github.com/DisgoOrg/disgohook a while ago and saw it being used here. The module was moved into https://github.com/disgoorg/disgo/tree/development/webhook
disgohook had a few bugs which are resolved in the new module and also the new module should be nicer to use in general!
2022-08-18 16:22:41 -03:00
Carlos Alexandro Becker
6d000e5cb1
feat: allow to specify version of brew deps (#3319)
* 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>
2022-08-17 22:58:41 -03:00
Carlos Alexandro Becker
3f60327964
feat: nfpm changelog support (#3309)
closes #3259

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-16 02:05:46 -03:00
Carlos Alexandro Becker
c83663cc26
fix: eventual race condition in artifacts (#3310)
* 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>
2022-08-16 02:05:36 -03:00
Carlos A Becker
ed42de3f3e
fix: typo
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-16 01:35:43 -03:00
Carlos Alexandro Becker
08e7038a20
feat: remove gofish (#3312)
* 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>
2022-08-16 01:16:45 -03:00
Carlos Alexandro Becker
4da595ed26
feat: strip_parent_binary_folder (#3261)
* 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>
2022-08-15 22:53:36 -03:00
Carlos A Becker
22da01914a
test: fix broken test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-10 00:14:51 -03:00
Carlos A Becker
102ac7e230
fix: changelog empty lines between sections 2022-08-08 00:20:10 -03:00
Carlos Alexandro Becker
2fecd94569
fix: do not push snaps concurrently (#3295)
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
2022-08-07 12:32:15 -03:00
Carlos A Becker
fa61448ded
feat: support provides field in nfpm config
refs #3259

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-07 12:13:20 -03:00
Carlos Alexandro Becker
d6306059d2
fix: brew style (#3274)
* 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>
2022-08-06 19:00:16 -03:00
Carlos Alexandro Becker
5a433347ac
feat: allow to skip scm release uploads (#3282)
* feat: allow to skip scm release uploads

refs #3268

* chore: schema update

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-06 18:59:59 -03:00
Carlos Alexandro Becker
ee17c9583d
feat(ci): compile with go 1.19 (#3278)
* 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
2022-08-06 18:44:23 -03:00
Carlos A Becker
05b3fbd305
refactor: make it easier to merge 2022-08-01 15:58:39 -03:00
Carlos A Becker
7aeebb12f2
docs: remove beta warning from docker manifests feature
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-07-19 10:37:13 -03:00
Carlos Alexandro Becker
5a6dd2fbc8
test: reducing test ouput (#3222)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-07-04 21:13:10 -03:00
Carlos Alexandro Becker
1d72e963f4
feat: allow parallelism by build target (#3213)
* 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>
2022-06-29 00:31:33 -03:00
Carlos Alexandro Becker
f75d64d6cc
feat: allow to override env for a target (#3201)
* 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>
2022-06-26 22:00:55 -03:00
Carlos Alexandro Becker
b3fcc54a32
feat: changelog group improvements (#3203)
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>
2022-06-26 22:00:23 -03:00
Carlos Alexandro Becker
83e40717de
feat: allow to template release.repo (#3205)
* 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>
2022-06-26 22:00:05 -03:00
CrazyMax
b1a3f301e7
fix: use default builder with buildx (#3199)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-06-24 16:13:33 -03:00
Carlos Alexandro Becker
de9949705d
fix: blob upload eating errors (#3185)
closes  #2652

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-24 00:14:12 -03:00
Carlos Alexandro Becker
72329ab722
refactor: improve handling of extra fields in artifacts (#3191)
* 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>
2022-06-23 23:36:19 -03:00
Carlos Alexandro Becker
0a2e8fcada
fix: improve docker publish skipping (#3184)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-23 08:49:33 -03:00
Carlos Alexandro Becker
d79484ef1d
feat: added --skip-before flag (#3182)
* 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>
2022-06-22 21:56:53 -03:00
Carlos Alexandro Becker
ae399220ef
feat: add --skip-docker (#3176)
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>
2022-06-22 21:39:20 -03:00
Carlos Alexandro Becker
9efea360b9
refactory: make easier to manage merges with pro (#3178)
* 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>
2022-06-22 01:48:11 -03:00
Carlos Alexandro Becker
fe7e2123bd
feat: replacing the log library (#3139)
* 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>
2022-06-21 21:11:15 -03:00
Carlos Alexandro Becker
2c59b8e1be
feat: remove empty_folders for good (#3163)
* 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>
2022-06-14 11:15:17 -03:00
Carlos A Becker
38c5e6a371
fix: deprecation message of nfpm.maintainers
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>
2022-05-24 09:12:10 -03:00
Corbin Phelps
8dde97c597
fix: Modified brew formula class generation to remove dots to match what homebrew expects (#3117)
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2022-05-20 10:25:35 -03:00
Carlos A Becker
a52fb997d1
docs: update email addresses
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-18 12:12:42 -03:00
Carlos Alexandro Becker
bbade2dd0f
fix: better handle docker skip errors (#3107)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-12 14:44:09 -03:00
Carlos Alexandro Becker
9c426a7b16
refactor: evaluate archive files in another package (#3101)
* 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>
2022-05-11 22:56:25 -03:00
Carlos Alexandro Becker
5d9110ab43
refactor: improve archive pipe (#3100)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-11 21:54:28 -03:00
Carlos A Becker
17e4d62791
fix: revert defaulting build.id to build.binary
refs #3098
refs #3063

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-11 11:42:37 -03:00
Carlos Alexandro Becker
e38e76cac8
feat: meta archives (#3093)
adds support for creating meta archives

closes #3085

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-05-10 09:17:30 -03:00
Carlos A Becker
f83efdb67a
chore: ignore deprecated strings.Title warn
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-05-09 22:57:46 -03:00
Carlos Alexandro Becker
53b1ee07cf
feat: allow git remote urls from non-scm sources (#3088)
basically allows to use goreleaser against a repo with a git url without both owner and repo name.

closes #3060
closes #3058

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-05-09 09:32:43 -03:00
Carlos Alexandro Becker
f812d1b920
fix: nfpm deprecation on nfpm check (#3087)
closes #3067

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-05-08 21:13:56 -03:00
Carlos Alexandro Becker
ea7a696fab
feat: improve docker errors (#3080)
* 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>
2022-05-02 22:05:42 -03:00
Carlos Alexandro Becker
5aeb8ace61
fix: prevent folder collisions in builds and universal binaries (#3063)
- 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>
2022-04-25 22:07:14 -03:00
Carlos Alexandro Becker
63436392db
fix: custom targets if missing goamd64, goarm, gomips (#3056)
* 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>
2022-04-20 09:43:39 -03:00
Carlos Alexandro Becker
922992ce76
fix: archive ids (#3052)
* 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>
2022-04-19 22:49:08 -03:00
Albert Salim
50fb252272
test: change test docker registry port numbers (#3046)
Port 5000 is used by MacOS Monterey for
Airplay Receiver by default.
2022-04-16 15:33:17 -03:00
Carlos A Becker
dbf2d0e293
fix: brew formula default goamd64
Was defaulting to v2 instead of v1.

closes #3049

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-04-16 15:26:14 -03:00
Carlos A Becker
3663ec1b13
test: goamd64 tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-04-15 23:26:25 -03:00
Carlos A Becker
21df724a1e
fix: snapcraft and GOAMD64
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-04-15 23:25:32 -03:00
Carlos A Becker
2d6e83cf3f
fix: nfpm conventional file names with GOAMD64
Fixes conventional file names when using GOAMD64

refs #3016

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-04-13 23:38:39 -03:00
Carlos A Becker
c30339070e
fix(snap): incorrect skip due go GOAMD64
the valid arch check was not considering GOAMD64

refs #3016

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-04-13 23:12:58 -03:00
Carlos Alexandro Becker
1c2a1b56d8
fix: nfpm lintian concurrency issue (#3039)
* 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>
2022-04-13 22:26:58 -03:00
Carlos A Becker
53bbc6546f
fix: goamd64 should allow the only range from v1 to v4
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>
2022-04-13 21:30:08 -03:00
Carlos Alexandro Becker
ce9058ac8c
refactor: use context on git exec calls (#3032) 2022-04-12 08:35:19 -03:00
Carlos A Becker
700c8a682f
fix: nfpm id filter 2022-04-12 01:08:49 -03:00
Carlos A Becker
9dfade2558
fix: nfpm default build ids to empty 2022-04-11 23:59:52 -03:00
Carlos A Becker
cd7edb7a2e
chore: fix typo 2022-04-11 23:58:39 -03:00
Carlos A Becker
9c773d6d6b
fix: remove some deprecated brew todos 2022-04-11 23:58:18 -03:00
Carlos A Becker
de825aab35
fix: remove deprecated todo 2022-04-11 23:57:17 -03:00
Carlos Alexandro Becker
b0583c700b
feat: support GOAMD64 (#3016)
* feat: support GOAMD64

* fix: test

* wip

* wip: docker et al

* fix: archive format name

* test: added new test

* feat: nfpm amd4, mips et al

* chore: rm unused file

* fix: brew for multiple goamd64

* fix: krew

* feat: aur

* feat: krew

* docs: brew

* feat: gofis

* feat: scoop

* fix: docker filters

* fix: snapcraft

* fix: improve diff a bit

* fix: snapcraft name template
2022-04-11 22:43:22 -03:00
Carlos Alexandro Becker
acfffe1c98
refactor: improve scoop tests (#3031)
* refactor: improve scoop tests

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: improve diff a bit
2022-04-11 20:19:58 -03:00
Carlos Alexandro Becker
02595554de
fix: use universal binary id (#3028)
Ensure the new ID is set, and add a test to prevent the bug from
happening again.

closes #3027
2022-04-08 21:15:07 -03:00
dependabot[bot]
c50dbc5bd5
feat(deps): bump github.com/charmbracelet/keygen from 0.2.1 to 0.3.0 (#3024)
* feat(deps): bump github.com/charmbracelet/keygen from 0.2.1 to 0.3.0

Bumps [github.com/charmbracelet/keygen](https://github.com/charmbracelet/keygen) from 0.2.1 to 0.3.0.
- [Release notes](https://github.com/charmbracelet/keygen/releases)
- [Commits](https://github.com/charmbracelet/keygen/compare/v0.2.1...v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/keygen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: dep update

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos A Becker <caarlos0@gmail.com>
2022-04-08 13:30:11 -03:00