1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00
Commit Graph

1143 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
85c86d61cf
fix: chocolatey push failing (#4300)
tested this on a fake repo, and it seems to fix the problem...

seems like choco does not like when the path has `/` in it, so passing
it through `filepath.Clean` fixes it.

also improved tests a bit, and made a small docs fix.


closes https://github.com/goreleaser/goreleaser/issues/4292
2023-09-16 14:08:11 -03:00
Vedant
cd139a78b5
feat(winget): update manifest schema version & links (#4298)
Use the latest schema `1.5.0` available on winget-pkgs.
2023-09-16 11:01:04 -03:00
Carlos Alexandro Becker
dbec7054ea
test: fix 2023-09-13 17:02:51 +00:00
Duane Waddle
01a93b4329
fix(sbom): Add LOCALAPPDATA to passthroughEnvVars (#4291)
Adds windows-specific `LOCALAPPDATA` to the list of passed through
environment variables.

closes #4290
2023-09-13 13:50:14 -03:00
Carlos Alexandro Becker
91fe5e40c4
fix: improve git info log output
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-07 18:48:48 +00:00
Carlos Alexandro Becker
67039edc35
fix: typo in error message 2023-09-07 18:48:48 +00:00
Carlos Alexandro Becker
5c8b5ced67
test: gomod on old go version
refs #4280

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-07 18:08:56 +00:00
Marcin Białoń
bb175015c7
feat: skip gomod pipe when Go does not support modules (#4280)
<!--

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... -->

The gomod pipe will skip if the Go version does not support modules.

<!-- Why is this change being made? -->

I tried to use goreleaser to build a project with Go v1.8.7 and it
failed on `loading go mod information` step. The Go version used doesn't
support `go list -m`.

The build failed with the following error:
```
  • loading go mod information
  ⨯ release failed after 0s                          error=failed to get module path: exit status 2: flag provided but not defined: -m
usage: list [-e] [-f format] [-json] [build flags] [packages]

List lists the packages named by the import paths, one per line.
...
```

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...
2023-09-07 15:01:57 -03:00
Carlos Alexandro Becker
962429de06
fix(custom_publishers): skip publish is check by publish pipe (#4274)
the publish pipe, which runs all publishers, already skips all
publishers if skip publish is set, so this check is not needed here.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-04 16:21:11 -03:00
Carlos Alexandro Becker
da1d3f4fcf
fix(chocolatey): skip publish is check by publish pipe (#4273)
the publish pipe, which runs all publishers, already skips all
publishers if skip publish is set, so this check is not needed here.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-04 16:20:58 -03:00
Carlos Alexandro Becker
a962e3b3cf
fix(snapcrafts): skip publish is check by publish pipe (#4275)
the publish pipe, which runs all publishers, already skips all
publishers if skip publish is set, so this check is not needed here.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-04 16:20:36 -03:00
Carlos Alexandro Becker
8706fd2e89
feat: allow goreleaser to run in gerrit, soft-serve and others (#4271)
Currently, GoReleaser will assume you're running against github, gitea
or gitlab.

You could set `release.disable: true`, but it would still set and try to
use some defaults that could break things up.

Now, if you disable the release, goreleaser will not set these defaults.
It'll also hard error in some cases in which it would happily produce
invalid resources before, namely, if `release.disable` is set, and, for
example, `brews.url_template` is empty (in which case it would try to
use the one from the release, usually github).

closes #4208
2023-09-04 11:23:38 -03:00
Carlos Alexandro Becker
62cc45aa50
feat: templates in upx.enabled (#4269)
refs https://github.com/orgs/goreleaser/discussions/4268
2023-09-01 15:10:29 -03:00
Carlos Alexandro Becker
983cc3755d
feat(docker): retry push if 503 (#4265)
refs https://github.com/orgs/goreleaser/discussions/4263

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-01 11:16:16 -03:00
Carlos Alexandro Becker
ecdbf5877c
feat: git.ignore_tags (#4255)
Allows to ignore tags that match the given regex expressions.
2023-08-27 15:57:03 -03:00
Carlos Alexandro Becker
c91c4b7cd8
feat: improve template error handling (#4256)
- wrap the multiple errors in an internal error with cleaner messaging
- improve testlib.RequireTemplateError and several tests
2023-08-24 22:06:12 -03:00
Carlos Alexandro Becker
f0d0cac469
feat: update to go 1.21 (#4244)
update to go 1.21

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-08-15 11:15:04 -03:00
Carlos Alexandro Becker
cb093219c1
fix: snapshot should run before before hooks (#4250)
Otherwise .Version will be wrong.

closes #4247
2023-08-15 10:24:53 -03:00
Carlos Alexandro Becker
08e307ea8d
Revert "fix: skip defaults for skipped pipes (#4210)"
This reverts commit dccd68c126.

This breaks `continue` on goreleaser-pro.

Will re-work this for the next release.
2023-08-09 02:43:34 +00:00
Carlos Alexandro Becker
dccd68c126
fix: skip defaults for skipped pipes (#4210)
closes #4208

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-08-08 22:43:39 -03:00
Carlos Alexandro Becker
bbe2ee7bfb
refactor: properly annotate deprecated options
Removed unused, deprecated stuff.
2023-08-04 14:47:54 +00:00
Boshi Lian
65544aeec0
fix: docker respects builds binary file paths (#4218)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->

`docker` packaging does not honor the path structure defined in
builds/binary
it copies all binaries to temp docker build folder

this PR fixes the behavior and make it same as `archive` 

for example

```
builds:
- id: xxx 
  binary: plugins/xxx
```

before:

```
/tmp/goreleaserdocker2210262014/xxx
```

after:

```
/tmp/goreleaserdocker2210262014/plugins/xxx
```


<!-- If applied, this commit will... -->



<!-- Why is this change being made? -->



<!-- # Provide links to any relevant tickets, URLs or other resources
-->
2023-08-03 09:19:07 -03:00
Carlos Alexandro Becker
d0a86edd90
feat(snapcraft): allow to disable (#4228)
allows to disable a snapcraft configuration based on a template, e.g. if
snapshot, nightly, etc
2023-08-03 09:17:26 -03:00
Carlos Alexandro Becker
1d17b311e3
fix(nix): multiple archives for the same platform (#4227)
this fixes is specially useful for universal binaries that replace the
separated binaries.

closes #4226
2023-08-02 22:58:10 -03:00
Carlos Alexandro Becker
79688e0ae5
test(docker): fix broken test
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-08-03 01:57:40 +00:00
Carlos Alexandro Becker
c6655bc094
feat(nix): support zip packages (#4225)
closes https://github.com/goreleaser/goreleaser/issues/4224
2023-08-02 20:42:35 -03:00
Carlos Alexandro Becker
51d9fc67a9
feat(deps): use mergo 1.0.0 2023-07-31 16:32:36 +00:00
Carlos Alexandro Becker
d7921d4638 feat(brew): extra_install
Allows to add manpages and shell completion installs without overriding
the default bin.install.
2023-07-31 09:40:35 -03:00
Carlos Alexandro Becker
025b8757b8
fix(nix): improve extra_install 2023-07-30 03:04:59 +00:00
Carlos Alexandro Becker
8a4c874a13 fix(nix): potentially unused with lib 2023-07-26 11:32:37 -03:00
Carlos Alexandro Becker
f107338870 fix(nix): fmt
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-26 11:32:37 -03:00
Carlos Alexandro Becker
94f080d77c feat(nix): extraInstall 2023-07-26 11:32:37 -03:00
Carlos Alexandro Becker
e672699b0a feat(nix): runtime dependencies
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-26 11:32:37 -03:00
Carlos Alexandro Becker
5e27651dae
fix: using token log message
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-26 00:34:40 +00:00
Carlos Alexandro Becker
4266634752
feat: improve output (#4206)
- improves deprecation warning styles a bit so they caught the readers
eye faster and are easier to read
- warns if the user uses `builds.target` in conjunction with other
options which are ignored in that case
- improved env output
- improved no configuration found warning

some of the changes:

<img width="1263" alt="CleanShot 2023-07-24 at 21 38 41@2x"
src="https://github.com/goreleaser/goreleaser/assets/245435/40465853-7177-44d6-b07b-61b67590669a">

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-25 08:26:44 -03:00
Carlos Alexandro Becker
a726a29d70
fix(winget): improve commit msgs (#4199)
closes  #4198
2023-07-19 22:04:45 -03:00
Carlos Alexandro Becker
7a2fc10625
feat(winget): PortableCommandAlias (#4196)
needs #4195

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-18 16:43:36 -03:00
Carl Tashian
00bc248c1b
fix(winget): replace forward slashes in Winget RelativeFilePath (#4195)
If an archive filename contains `/` characters, they can sneak into
Winget's `RelativeFilePath`.
In this PR, I make sure that `RelativeFilePath` only uses `\` directory
separators.
2023-07-18 15:34:07 -03:00
Carlos Alexandro Becker
3ed6751bb9
feat(nfpm): allow to template scripts names 2023-07-18 00:44:11 +00:00
Carlos Alexandro Becker
58a6ba4e30
feat(scoop): support arm64 (#4193)
adds arm64 support to scoops.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-17 21:26:18 -03:00
Carlos Alexandro Becker
8e0b9405f9
fix: use t.TempDir
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-17 11:56:06 +00:00
Carlos Alexandro Becker
a0f0d01a81
refactor: dockefile tmpl 2023-07-17 02:31:00 +00:00
Carlos Alexandro Becker
cbb09b89fd
fix(docker): should use cmd.Environ() instead of cmd.Env
refs #4187
2023-07-17 02:26:48 +00:00
Carlos Alexandro Becker
609e7c5657
feat: metadata mod_timestamp (#4188)
closes #4167

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-15 16:53:52 -03:00
Carlos Alexandro Becker
b9a08c4dc9
refactor: gio.Chtimes (#4191)
we're repeating this quite a bit

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-15 16:33:40 -03:00
Carlos Alexandro Becker
3c1ebe82cd
feat: support setting mod_timestamp in universalbinary (#4172)
refs #4167

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-13 23:23:41 -03:00
Carlos Alexandro Becker
52792f4a15
fix(nfpm): lintian unix path (#4175)
closes #4174
needs https://github.com/goreleaser/nfpm/pull/690

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-13 23:03:40 -03:00
Carlos Alexandro Becker
53ef7fe172
fix(nfpm): rpm.packager binding was missing
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-14 01:56:04 +00:00
Carlos Alexandro Becker
cc18ad5184
feat(nfpm): update + rpm prefixes support
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-14 01:55:47 +00:00
Carlos Alexandro Becker
8752504b81
fix: docker.env should be first
refs #4187
2023-07-14 00:25:40 +00:00
Marcos Nils
789a4d45fe
ci: append envs when calling docker instead of overriding (#4187)
This is causing issues when trying to run tests in Dagger.
ref:
https://github.com/goreleaser/goreleaser/pull/4186#discussion_r1262977616

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2023-07-13 21:22:47 -03:00
Jimmi Dyson
f170c92db9
fix: delete temporary dir used for docker build (#4178)
<!--

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... -->

Delete the temporary directory used for building Docker images.

<!-- Why is this change being made? -->

Leaving the temporary directory leads to wasted disk space.

<!-- # Provide links to any relevant tickets, URLs or other resources
-->
2023-07-11 14:12:21 -03:00
Carlos Alexandro Becker
a324009978
fix(winget): add missing fields, more templates (#4164)
This adds missing fields:

- LicenseURL
- CopyrightURL
- Tags

As well as make several more fields templateable.


cc/ @twpayne

Co-authored-by: Tom Payne <tom.payne@flarm.com>
2023-07-05 23:33:18 -03:00
Tom Payne
c57cdab0c6
refactor: add function to apply template multiple times (#4158)
If applied, this commit simplifies the code required to support
templated fields in configuration files. This should make it easier to
add more templated fields in the future.

As [discussed first on
Discord](https://discord.com/channels/890434333251362866/1032457293687685191/1124033219747127316).
2023-06-30 14:46:53 -03:00
Carlos Alexandro Becker
5f7be841d8
fix(nix): description, path and homepage should allow templates (#4156)
- nix.description, nix.path, and nix.homepage should allow templates
- nix.path was defaulting to wrong value, fixed

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-29 14:15:53 -03:00
Carlos Alexandro Becker
e9760a167b
refactor(winget): minor improvements (#4157)
improved readability a bit

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-29 13:59:33 -03:00
Carlos Alexandro Becker
a6e6e7098d
feat(deps): update env to v9
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-28 16:29:19 +00:00
Radu Jipa
3d77e8e194
fix: Scoop releases being skipped via disabled SCM releases (#4150)
The check to skip Scoop releases when SCM ones are disabled seems to be
the only place where this is happening and in conflict to Brew releases.
These two need not be linked as users can configure the `url_template`
to point elsewhere.

--- 

Consider the following use case:

```
 * goreleaser/my-app.yml
   - builds: spec for building a Go binary for my-app
   - dockers: spec for packaging my-app in a container and pushing to Artifactory & GCP
   - archives: spec for zipping up my-app binary
   - artifactories: spec for pushing archives of my-app to a private jfrog artifactory
   - brews: spec for publishing my-app through brew on macOS with URLs from artifactory
   - scoop: spec for publishing my-app through scoop on Windows with URLs from artifactory
   - release: disabled SCM (e.g. GitHub) release
```

Running `goreleaser release -f goreleaser/my-app.yml` with the above
setup results in the correct artifacts (archives & containers) being
published to Artifactory, GCP, Brew, but no Scoop.

Given that Scoop's `skip_upload` cannot be templated in 1.18 and I do
not wish to have SCM releases & tags on every release, one can be rather
stuck.
2023-06-28 09:44:59 -03:00
Carlos Alexandro Becker
7671b54056
test(ko): fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-26 17:47:12 +00:00
Carlos Alexandro Becker
7d485d6399
fix(winget): default commit message
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-26 17:09:18 +00:00
Carlos Alexandro Becker
faf3d2a52c
test(ko): fix error msg
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-26 16:58:19 +00:00
Carlos Alexandro Becker
6cd9674c97
chore: fix lint 2023-06-25 12:55:40 +00:00
Eng Zer Jun
73e59160de
test: use t.Setenv to set env vars (#4140)
We have been using `t.Setenv` is most of our tests. This PR replaces the
remaining `os.Setenv` with `t.Setenv`.

Reference: https://pkg.go.dev/testing#T.Setenv

```go
func TestFoo(t *testing.T) {
	// before
	os.Setenv(key, "new value")
	defer os.Unsetenv(key)
	
	// after
	t.Setenv(key, "new value")
}
```

---------

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-06-25 09:54:10 -03:00
Carlos Alexandro Becker
e9b4bc05da
fix: use commit msg as PR title 2023-06-25 05:16:37 +00:00
Carlos Alexandro Becker
2eaefa94b1
fix(winget): release notes should be optional
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-25 05:15:17 +00:00
Carlos Alexandro Becker
e525b66631
fix(winget): incorrect filenames (#4139)
- needs to use package identifier in the filename
- locale file need `locale` in its name

found out testing it in
https://github.com/microsoft/winget-pkgs/pull/110633
2023-06-25 01:27:08 -03:00
Carlos Alexandro Becker
4dc31e99b7
fix(nix): local filename when path not set 2023-06-25 04:26:31 +00:00
Carlos Alexandro Becker
528b06a075
fix(snapcraft): title and icon are optional (#4138)
It will otherwise create the empty fields in the yaml, and snapcraft
then complains they are empty and fail.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-24 23:38:24 -03:00
Carlos Alexandro Becker
76ce66c060
fix: improve brew/krew/scoop/nix/winget paths inside dist (#4137)
mimic the structure to be created in the target repo, and put each of
them in its own folder.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-24 23:38:09 -03:00
Carlos Alexandro Becker
f33a534825
fix: umask nfpm field (#4136)
nfpm was updated, but we never allowed to configure the umask field in
goreleaser.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-22 09:08:31 -03:00
Carlos Alexandro Becker
72cf8404c1
feat: continue on error (#4127)
closes #3989

Basically, when some of these pipes fail, the error will be memorized,
and all errors will be thrown in the end.

Meaning: the exit code will still be 1, but it'll not have stopped in
the first error.

Thinking of maybe adding a `--fail-fast` flag to disable this behavior
as well 🤔

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-20 09:33:59 -03:00
Carlos Alexandro Becker
42822497ae
feat(aur): single commit per package (#4126)
using the new multiple files api to have a single commit/push for all
files of a package.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-19 14:03:22 -03:00
Carlos Alexandro Becker
739490290f
test: improve more tests (#4124) 2023-06-18 11:58:17 -03:00
Carlos Alexandro Becker
c6851f5eee
fix(nix): hc should report nix-prefetch-url as a dependency
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-17 23:23:14 +00:00
Carlos Alexandro Becker
e5c9338efd
feat: changelog.include (#4122)
closes https://github.com/goreleaser/goreleaser/issues/4111
refs https://github.com/orgs/goreleaser/discussions/4110
recreated #4115

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-16 13:31:23 -03:00
Carlos Alexandro Becker
2ad313a7e2
test: syscall.EACCES and os.ErrNoExist (#4120)
extracted from #3795

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-15 23:53:20 -03:00
Carlos Alexandro Becker
bad7984962
test: improve executable not found checks (#4119)
extracted from #3795
2023-06-15 23:51:07 -03:00
Carlos Alexandro Becker
e5a0f662fd
test: ECONNREFUSED (#4118)
improved test check

extracted from #3795
2023-06-15 23:42:55 -03:00
Carlos Alexandro Becker
0f5b058363
feat(winget): support arm64
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-15 03:34:12 +00:00
Carlos Alexandro Becker
6afdb49c12
feat: winget support (#4081)
this will add support to winget into goreleaser.

Basically, the plan is:

- we generate the 3 needed yaml files 
- we commit them to a repo

and that's it.

Initially, will probably have limited options support, and will only
have the default locale.

###### TODO

- [x] docs
- [x] review by someone who knows how this works?
- [x] test install somewhere
- [x] more tests maybe?
- [x] PR templates via API?
https://github.com/goreleaser/goreleaser/pull/4105
- [x] real project test 
- [x] setup goreleaser to pr to winget as well
- [x] document sync fork stuff
https://github.com/goreleaser/goreleaser/pull/4106

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-14 23:59:55 -03:00
Carlos Alexandro Becker
81bd82b13b
fix(nix): improve error message
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-15 02:55:32 +00:00
Carlos Alexandro Becker
62b065dad0
feat: deprecate brews.tap, krews.index & scoops.bucket (#4099)
It should make goreleaser easier to use, as a `repository` is now always
called `repository`.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-14 00:13:21 -03:00
Carlos Alexandro Becker
aae9433a55
fix: archive extraformat when using format override 2023-06-13 12:16:05 +00:00
Carlos Alexandro Becker
e9c5a922f9
Revert "feat: add winget to pipeline"
This reverts commit 62f4bd5a66.

wrong commit sha
2023-06-13 12:15:28 +00:00
Carlos Alexandro Becker
62f4bd5a66
feat: add winget to pipeline 2023-06-13 03:47:35 +00:00
Adam Bouqdib
d4bbf44d65
feat(snapcraft): support title, icon, assumes & hooks (#3930)
This PR adds support for a few missing snapcraft fields which were
required for my project.
Reference here: https://snapcraft.io/docs/snapcraft-yaml-reference
2023-06-12 09:03:24 -03:00
Carlos Alexandro Becker
68b38c0229
test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-07 02:57:51 +00:00
Carlos Alexandro Becker
eadd377730
feat: remove deprecated rlcp options (#4076)
removing another deprecated option

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-06 13:54:43 -03:00
Carlos Alexandro Becker
66cee9493c
feat: remove deprecated replacements (#4075)
since this will be a late, big release, let's remove the deprecated
stuff that expired

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-06 11:46:02 -03:00
Carlos Alexandro Becker
de599666b8
fix: deprecate brews.plist (#4073)
service has been available for a long time as well.

closes #3990
2023-06-06 01:02:40 -03:00
Carlos Alexandro Becker
4936929ddd
feat: sort brew dependencies
so it better aligns with brew audit

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-06 00:32:46 -03:00
Ville Skyttä
ef690d07ef
style: spelling and grammar fixes (#4069)
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-05 13:08:57 -03:00
Carlos Alexandro Becker
09411ea60a
feat: Checksums as a template field (#4064)
this would allow to add the checksums to the body of the release
contents, for example.


refs https://github.com/orgs/goreleaser/discussions/4063

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-05 13:05:28 -03:00
Carlos Alexandro Becker
d0ba64e70d
test: fix scoop tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-01 17:17:08 +00:00
Carlos Alexandro Becker
f618f00cd0
test: fix temp file
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-31 18:37:21 +00:00
Carlos Alexandro Becker
1d92a36340
feat(scoop): allow to template description and homepage (#4057)
make `scoops.description` and `scoops.homepage` templateable as well.
2023-05-30 13:41:24 -03:00
Carlos Alexandro Becker
ffad12eae4
feat(upx): allow to filter by goos, goarch, goarm, goamd64 (#4056)
closes #3993
closes #3982
2023-05-30 08:50:08 -03:00
Carlos Alexandro Becker
ac5788eed0
fix: add do not edit header to generated files
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-29 18:23:00 +00:00
Carlos Alexandro Becker
f6b9ccbd8f
feat(github): allow to open PRs as drafts (#4054)
This allows to open a pull requests as a draft.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-29 15:07:00 -03:00
Carlos Alexandro Becker
773cb91a7a
feat(github): allow to PR cross-repo (#4053)
This allows to open pull requests across repositories on nix, brew, krew
and scoop.

closes #4048

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-29 14:37:10 -03:00
Carlos Alexandro Becker
a3bc051933
fix(nix): better errors if nix-prefetch-url fails 2023-05-29 16:38:11 +00:00
Carlos Alexandro Becker
75c47d1da8
feat(nix): support armv6l and armv7l (#4051)
closes #4049
2023-05-29 11:59:19 -03:00
Carlos Alexandro Becker
e0dabc1cb9
feat(telegram): ability to choose msg format, mdv2escape (#4036)
this allows to choose parse mode between `HTML` and `Markdownv2`, and
adds a new template function, `mdv2escape`, to escape the characters
according to telegram docs:
https://core.telegram.org/bots/api#formatting-options


closes #4021
2023-05-27 00:17:02 -03:00
Carlos Alexandro Becker
3bb9a9a5b3
feat: allow to sign KO manifests (#4038)
add ko-generated manifests to the artifact list, this way they can be
signed later.

closes #4027

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-27 00:16:07 -03:00
Carlos Alexandro Becker
051381837d
feat(ko): allow to have an empty tag name (#4043)
Empty tag names will then be filtered out. This allows to have optional
tags depending on templates, for example,
`{{if not .Prerelease}}latest{{end}}`, among other use cases.

This already happens in the `dockers` section, and is now implemented in
`kos` too.

refs https://github.com/orgs/goreleaser/discussions/4042
2023-05-27 00:14:02 -03:00
Carlos Alexandro Becker
b9e276feca
fix(nfpm): write too long when writing the lintian file (#4039)
The lintian files were being written for every format, whether they were
a deb or not.

Since package name and arches are the same, and packaging runs in
parallel, it could happen that one goroutine is reading while the other
is writing, as we were guaranteeing uniquenes based on package name and
arch only.

This makes it only creates the lintian files when format is deb, so this
shouldn't happen anymore.

It also goes one step further by using the actual format in the filepath
instead of hard-coding "deb".

This also still supports tmux.

closes #4024
2023-05-26 09:59:48 -03:00
Carlos Alexandro Becker
99afc8d62e
feat: nix support (#4012)
very, very, very WIP implementation of nixpkgs for GoReleaser.

**Decisions made for this first version:**
- only linux and darwin, arm64, 386 and amd64
- only support pkgs from goreleaser-generated archives
- no support to push into default nixpkgs repository
- no support to automatically add the _maybe_ new pkg to the root
`default.nix`
- the generated nixpkg will be rather verbose, which shouldn't be too
much of an issue as it is autogenerated anyway

**TODOs**:
- [x] macos universal binary support
- [x] custom pkg path (e.g. pkgs/misc/foo/bar/default.nix)
- [x] handle archives with a folder in them
- [x] add more options: postInstall, ??

**Will be handled in future versions**:
- [ ] archives.format=binary support
- [ ] compile from source
- [ ] PR-ing into nixpkgs
- [ ] armv6l-linux & armv7l-linux support

closes #3537

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-25 23:07:10 -03:00
Carlos Alexandro Becker
dbd4342078
test(nfpm): fix after update 2023-05-24 12:18:58 +00:00
Carlos Alexandro Becker
27f94523c8
fix(scoop): allow templating name and skip_upload
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-19 14:25:39 +00:00
Carlos Alexandro Becker
dfcd535e31
fix: improve "pushing" logs for multiple publishers 2023-05-19 14:10:06 +00:00
Carlos Alexandro Becker
b5e8d6db06
fix(archive): warn only for non-default globs with no matches (#4013)
Adjust the logging of warnings for unmatched globs to only show when the
glob is not a default. No warning will be output for the default globs
when there are no matching files.

These are defaults, by design, very generic.
We should not warn the user about them not finding anything, as that is
their expected behavior most of the time.
2023-05-16 09:22:22 -03:00
Carlos Alexandro Becker
05d25567f9
feat: allow to template dockers.skip_push and docker_manifests.skip_push (#4008) 2023-05-12 01:51:02 -03:00
Carlos Alexandro Becker
6eed3e03b0
fix: typo in a brew error message 2023-05-02 12:18:36 +00:00
Carlos Alexandro Becker
6fd5fd45ea
feat: improve output (#3966)
- log keys will be ordered as intended instead of sorted
- paths always relative to cwd

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-02 09:06:35 -03:00
Carlos Alexandro Becker
4330b522ea
feat: IsGitDirty template variable (#3967)
will only ever be true on snapshots or when ran with `--skip-validate`.
This should be useful as a ldflag, for example.
2023-05-02 01:04:18 -03:00
Carlos Alexandro Becker
43ae761179
feat: native upx support (#3965)
this adds a new root-level `upx` config, so users can pack their
binaries with upx :)

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-01 21:22:05 -03:00
Carlos Alexandro Becker
eb823dee14
feat: allow multiple scoops (#3963)
This brings the scoops feature a bit more closer to similar pipes, like
brew and krew.

- It now supports multiple scoops
- It improves some validations to prevent wrong manifests
- It uses extra.binaries instead of extra.builds, as brew does too
	- extra.builds is now unused, will be removed in a subsequent PR
- More tests were added as well

closes #3941

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-04-30 21:29:36 -03:00
Carlos Alexandro Becker
7858e3ee1a
refactor: improvements 2023-04-30 13:23:26 +00:00
Carlos Alexandro Becker
5bf42b726f
feat: publish taps, krews and scoops to regular git repositories (#3961)
basically redoing #3559 as it got impossible to merge with the many
changes since it was open (which is totally my fault for not merging it
earlier).

Anyhow, still a WIP, going also doing some other related improvements in
the way.

cc/ @graytonio

closes #3559
closes #3525

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Grayton Ward <graytonio.ward@gmail.com>
2023-04-30 10:18:13 -03:00
Carlos Alexandro Becker
95b809dd13
feat: allow to template nfpms.package_name (#3960)
closes https://github.com/goreleaser/goreleaser/issues/3956
2023-04-29 15:30:52 -03:00
Carlos Alexandro Becker
30fc74df24
fix: log when no artifacts match for signing 2023-04-28 01:07:38 +00:00
Carlos Alexandro Becker
f3e1170a89
feat: log generated artifact sizes (#3954)
This adds a log with the size of the generated binaries/packages/etc in
the end of the build process, and also adds it to the artifacts.json

closes #3949

TODO:

- [x] tests
- [x] docs
- [ ] ??

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-04-23 20:27:16 -03:00
dependabot[bot]
2d5cb60771
feat(deps): bump github.com/charmbracelet/keygen from 0.3.0 to 0.4.1 (#3932)
Bumps
[github.com/charmbracelet/keygen](https://github.com/charmbracelet/keygen)
from 0.3.0 to 0.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/charmbracelet/keygen/releases">github.com/charmbracelet/keygen's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.1</h2>
<h2>Changelog</h2>
<h3>Bug fixes</h3>
<ul>
<li>ba5b3746062cbc051702c188911f44c1e2b5c986: fix: don't trim key path
(<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
</ul>
<hr />
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><!-- raw HTML
omitted --></p>
<p>Thoughts? Questions? We love hearing from you. Feel free to reach out
on <a href="https://twitter.com/charmcli">Twitter</a>, <a
href="https://mastodon.technology/@charm">The Fediverse</a>, or on <a
href="https://charm.sh/chat">Discord</a>.</p>
<h2>v0.4.0</h2>
<h1>Breaking Change</h1>
<ul>
<li>Keygen no longer appends the key type to the file path.</li>
<li>Use functional options to specify key type, passphrase, and other
options.</li>
<li><code>PrivateKeyPEM</code> is now <code>RawPrivateKey</code></li>
<li><code>RawProtectedPrivateKey</code> returns the password protected
PEM encoded private key.</li>
<li><code>PublicKey</code> is now <code>RawAuthorizedKey</code>.</li>
<li><code>AuthorizedKey</code> returns the authorized key stripped out
of comments and options (the ssh pubic key only).</li>
<li><code>PrivateKey</code> now returns the underlying
<code>crypto.PrivateKey</code></li>
<li>Use <code>Signer</code> to get an <code>ssh.Signer</code> from your
key pair.</li>
</ul>
<h2>Changelog</h2>
<h3>New Features</h3>
<ul>
<li>ab32d1ae447e5d74a47dd64ec2e75d0a827ccc9b: feat(ci): add workflows
and goreleaser (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
<li>6ed037835403e5da4a2aa10e5c8568ff4a3bad41: feat: add more tests (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
<li>37c7434ac69d79048521a7e4bfa0f9dfbb0c1f23: feat: bump dependencies
(<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
<li>8d80e760657463eda55e2f0c773ed3fe3b3e3b08: feat: return ssh.Signer
(<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
<li>6c0cbbb70022377d611d25d98836e016b2c145a5: feat: specify ECDSA
elliptic curve (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>30d86a9582001686d63de3f79e4e90a7b6a62a9e: fix: update x/crypto (<a
href="https://redirect.github.com/charmbracelet/keygen/issues/8">#8</a>)
(<a href="https://github.com/caarlos0"><code>@​caarlos0</code></a>)</li>
</ul>
<h3>Documentation updates</h3>
<ul>
<li>eef068dedc6af24e8eda0c99db3a03c988b46cff: docs: new readme footer
(<a href="https://github.com/muesli"><code>@​muesli</code></a>)</li>
<li>f7556041d69b45aef018df2269d29e6d018ae6cc: docs: update example in
readme (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
</ul>
<h3>Other work</h3>
<ul>
<li>472a463d0e8df9e768b350d75ee57a8c9baf69d6: ref: change api to expose
ssh.PublicKey and authorizd_key (<a
href="https://github.com/aymanbagabas"><code>@​aymanbagabas</code></a>)</li>
</ul>
<hr />
<p><!-- raw HTML omitted --><!-- raw HTML omitted --><!-- raw HTML
omitted --></p>
<p>Thoughts? Questions? We love hearing from you. Feel free to reach out
on <a href="https://twitter.com/charmcli">Twitter</a>, <a
href="https://mastodon.technology/@charm">The Fediverse</a>, or on <a
href="https://charm.sh/chat">Discord</a>.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ba5b374606"><code>ba5b374</code></a>
fix: don't trim key path</li>
<li><a
href="6ed0378354"><code>6ed0378</code></a>
feat: add more tests</li>
<li><a
href="6c0cbbb700"><code>6c0cbbb</code></a>
feat: specify ECDSA elliptic curve</li>
<li><a
href="8d80e76065"><code>8d80e76</code></a>
feat: return ssh.Signer</li>
<li><a
href="3dbbf0ca45"><code>3dbbf0c</code></a>
chore: go mod tidy</li>
<li><a
href="37c7434ac6"><code>37c7434</code></a>
feat: bump dependencies</li>
<li><a
href="472a463d0e"><code>472a463</code></a>
ref: change api to expose ssh.PublicKey and authorizd_key</li>
<li><a
href="30d86a9582"><code>30d86a9</code></a>
fix: update x/crypto (<a
href="https://redirect.github.com/charmbracelet/keygen/issues/8">#8</a>)</li>
<li><a
href="eef068dedc"><code>eef068d</code></a>
docs: new readme footer</li>
<li><a
href="f7556041d6"><code>f755604</code></a>
docs: update example in readme</li>
<li>Additional commits viewable in <a
href="https://github.com/charmbracelet/keygen/compare/v0.3.0...v0.4.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/charmbracelet/keygen&package-manager=go_modules&previous-version=0.3.0&new-version=0.4.1)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-04-23 14:21:33 -03:00
John Olheiser
6b86499655
feat: add force_token to config (#3936)
As a follow-up to #3910, this adds `force_token` to the config.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-04-23 13:53:45 -03:00
Carlos Alexandro Becker
3c7a63979c
test: ensure utf-8 sources/archives filenames work properly (#3925)
This now works for files added to the source archive **after** the `git
archive` command is run. During the `git archive`, it seems that the
`tar` is still using some format that doesn't support utf-8 by default.

Tomorrow I'll look more into it.

see https://pkg.go.dev/archive/tar#Format

closes #3812

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-Authored-By: Mohammed Al Sahaf <msaa1990@gmail.com>
2023-04-15 15:48:14 -03:00
Carlos Alexandro Becker
e872e45b44
fix: improve docker error handling (#3942)
refs
https://github.com/goreleaser/goreleaser/pull/3940#issuecomment-1507149519
2023-04-13 13:56:56 -03:00
Carlos Alexandro Becker
f6b5e9abb8
fix: source archive not being added when no extra-files (#3938)
closes #3937

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-04-13 11:44:02 -03:00
Matthew Bamber
ac19f902b4
fix(nfpm): Add extension to produced artifacts (#3940)
Add extension to produced artifacts so that they can be filtered in
later steps

Fixes #3933

Co-authored-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-13 11:42:58 -03:00
Carlos Alexandro Becker
d5a413f9f4
feat: add context info to docker build errors (#3920)
its too hard to debug docker build issues... sometimes is just a typo in
the binary name, and you might end debugging it for way too long...

this prints the full path to the build context (so, locally at least,
you can cd into it) and also all the files available there when the
error seems to be one of the "file not found" kind.

Hopefully this helps fixing things easier :)

closes #3912

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-08 21:06:04 -03:00
Carlos A Becker
00d16bb51d
test: improve source tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-08 02:30:26 +00:00
Carlos Alexandro Becker
0eb3e7975c
fix: use git-archive under the hood (#3904)
This reverts back to using `git archive` for the source archives... but
will keep supporting extra files.

##### How it works:

Basically, we run `git archive` as before.
Then, we make a backup of the generated archive, and create a new one
copying by reading from the backup and writing into the new one.
Finally, we write the extra files to the new one as well.

This only happens if the configuration does have extra files, otherwise,
just the simple `git archive` will be run.

PS: we can't just append to the archive because weird tar format
paddings et al.

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-07 22:53:15 -03:00
Carlos Alexandro Becker
282c42164e
feat: allow to pr scoop manifests (#3916)
follow up of https://github.com/goreleaser/goreleaser/pull/3903

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-07 11:48:49 -03:00
Carlos Alexandro Becker
5805c5d608
feat: allow to pr krew plugin manifests (#3915)
following up on #3903

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-07 11:48:35 -03:00
Carlos Alexandro Becker
8b1c4ead60
feat: allow to PR homebrew taps (#3903)
closes #3485

also fixed a bug in file creation for github: it was always searching
for the file in the default branch

also, we don't need to create the file first, update does both create
and update.

TODO: implement the for krew, scoop, etc...

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-06 22:58:06 -03:00
Carlos A Becker
137ed3be74
feat(deps): update caarlos0/env to v8
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-07 01:50:09 +00:00
Carlos Alexandro Becker
dc6a4e7e2f
feat: allow to forcefully use a token when multiple are set (#3910)
This would allow to, when multiple tokens are set in the environment,
force which one you want to use.

The need for this comes from the fact gitea sets both `GITHUB_TOKEN` and
`GITEA_TOKEN`, and doesn't allow to easily disable either.

With this, users can add a `GORELEASER_FORCE_TOKEN=gitea` to force the
gitea client to be used.

I'm not sure what's the best name for this env yet, happy to hear
suggestions.

Also improved the `env_test.go` file a bit, as it was kinda messy with
env vars...

refs https://github.com/orgs/goreleaser/discussions/3900

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-05 16:33:22 -03:00
Lars Lehtonen
5af2c31c7a
refactor: fix redundant net/http import (#3897)
This fixes a redundant import of `net/http` in `internal/pipe/upload`.

Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2023-03-30 08:54:52 -03:00
dependabot[bot]
43731e252c
feat(deps): bump github.com/google/ko from 0.12.0 to 0.13.0 (#3880)
Bumps [github.com/google/ko](https://github.com/google/ko) from 0.12.0
to 0.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/ko/releases">github.com/google/ko's
releases</a>.</em></p>
<blockquote>
<h2>v0.13.0</h2>
<h2>What's Changed</h2>
<ul>
<li>SPDX: Fix package manager label by <a
href="https://github.com/puerco"><code>@​puerco</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/801">ko-build/ko#801</a></li>
<li>SPDX 2.3 support by <a
href="https://github.com/puerco"><code>@​puerco</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/803">ko-build/ko#803</a></li>
<li>ci: build and test using 1.18 and 1.19 (drop 1.17) by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/812">ko-build/ko#812</a></li>
<li>removes repo move message by <a
href="https://github.com/mchmarny"><code>@​mchmarny</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/814">ko-build/ko#814</a></li>
<li>feat: write sbom result to disk by <a
href="https://github.com/developer-guy"><code>@​developer-guy</code></a>
in <a
href="https://redirect.github.com/ko-build/ko/pull/822">ko-build/ko#822</a></li>
<li>feat: adding support for using multiple keychain for sending sbom
results to a different repository by <a
href="https://github.com/developer-guy"><code>@​developer-guy</code></a>
in <a
href="https://redirect.github.com/ko-build/ko/pull/821">ko-build/ko#821</a></li>
<li>Move docs to ko.build by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/749">ko-build/ko#749</a></li>
<li>Update setup-ko version by <a
href="https://github.com/ianlewis"><code>@​ianlewis</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/836">ko-build/ko#836</a></li>
<li>Add -- usage in readme by <a
href="https://github.com/jwcesign"><code>@​jwcesign</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/840">ko-build/ko#840</a></li>
<li>add CONTRIBUTING, code of conduct, roadmap by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/837">ko-build/ko#837</a></li>
<li>attempt to fix GH Pages publishing by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/843">ko-build/ko#843</a></li>
<li>doc: fix link to Installation page in Getting Started by <a
href="https://github.com/antoineco"><code>@​antoineco</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/846">ko-build/ko#846</a></li>
<li>.ko.yaml: bump golang 1.18 -&gt; 1.19 by <a
href="https://github.com/srenatus"><code>@​srenatus</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/848">ko-build/ko#848</a></li>
<li>truncate -image-refs file by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/855">ko-build/ko#855</a></li>
<li>update docs: fix broken links, align with README by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/854">ko-build/ko#854</a></li>
<li>Handle KO_DOCKER_REPO=ko.local/repo and --bare correctly by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/820">ko-build/ko#820</a></li>
<li>another docs update by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/856">ko-build/ko#856</a></li>
<li>ko.build: support some common shortlinks by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/872">ko-build/ko#872</a></li>
<li>install: fail with 404 instead of gzip error when url was wrong by
<a href="https://github.com/grosser"><code>@​grosser</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/879">ko-build/ko#879</a></li>
<li>feat: deduplicate tags by <a
href="https://github.com/bluebrown"><code>@​bluebrown</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/884">ko-build/ko#884</a></li>
<li>install mkdocs-redirect when publishing site by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/873">ko-build/ko#873</a></li>
<li>nit: replace one-item slice with const by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/885">ko-build/ko#885</a></li>
<li>Temp fix for SLSA generators by <a
href="https://github.com/laurentsimon"><code>@​laurentsimon</code></a>
in <a
href="https://redirect.github.com/ko-build/ko/pull/886">ko-build/ko#886</a></li>
<li>Fix verifier by <a
href="https://github.com/laurentsimon"><code>@​laurentsimon</code></a>
in <a
href="https://redirect.github.com/ko-build/ko/pull/891">ko-build/ko#891</a></li>
<li>Fix link in static-assets.md by <a
href="https://github.com/yuryu"><code>@​yuryu</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/893">ko-build/ko#893</a></li>
<li>add KO_DEFAULTBASEIMAGE usage to docs by <a
href="https://github.com/developer-guy"><code>@​developer-guy</code></a>
in <a
href="https://redirect.github.com/ko-build/ko/pull/895">ko-build/ko#895</a></li>
<li>Publish an tagged image on release by <a
href="https://github.com/vdemeester"><code>@​vdemeester</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/868">ko-build/ko#868</a></li>
<li>Add option to configure default platforms by <a
href="https://github.com/ReToCode"><code>@​ReToCode</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/897">ko-build/ko#897</a></li>
<li>Fix broken SLSA link by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/899">ko-build/ko#899</a></li>
<li>add MAINTAINERS.md by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/905">ko-build/ko#905</a></li>
<li>fix: possible race condition when applying templates to
flags/ldflags by <a
href="https://github.com/caarlos0"><code>@​caarlos0</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/913">ko-build/ko#913</a></li>
<li>update docs to reflect actual default base image by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/903">ko-build/ko#903</a></li>
<li>remove repeated error message on failure by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/921">ko-build/ko#921</a></li>
<li>website: update CNCF announcement by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/920">ko-build/ko#920</a></li>
<li>fix KO_CONFIG_PATH pointing to a file by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/923">ko-build/ko#923</a></li>
<li>upgrade to cosign v2.0.0-rc.0 by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/933">ko-build/ko#933</a></li>
<li>Feature: Add ECR presubmit testing. by <a
href="https://github.com/mattmoor"><code>@​mattmoor</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/934">ko-build/ko#934</a></li>
<li>remove 'ko deps' by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/937">ko-build/ko#937</a></li>
<li>feat: Add KO_GO_PATH env var by <a
href="https://github.com/embano1"><code>@​embano1</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/930">ko-build/ko#930</a></li>
<li>add ko.build/slack short link by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/945">ko-build/ko#945</a></li>
<li>update link to ko goreleaser docs by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/936">ko-build/ko#936</a></li>
<li>add ko community meeting details by <a
href="https://github.com/developer-guy"><code>@​developer-guy</code></a>
in <a
href="https://redirect.github.com/ko-build/ko/pull/938">ko-build/ko#938</a></li>
<li>fix cosign by adding --yes by <a
href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/973">ko-build/ko#973</a></li>
<li>fix: handle docker's unknown/unknown platform in index manifests by
<a href="https://github.com/imjasonh"><code>@​imjasonh</code></a> in <a
href="https://redirect.github.com/ko-build/ko/pull/975">ko-build/ko#975</a></li>
<li>fix file extension for cyclonedx by <a
href="https://github.com/developer-guy"><code>@​developer-guy</code></a>
in <a
href="https://redirect.github.com/ko-build/ko/pull/974">ko-build/ko#974</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/ianlewis"><code>@​ianlewis</code></a>
made their first contribution in <a
href="https://redirect.github.com/ko-build/ko/pull/836">ko-build/ko#836</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e22e7a15ff"><code>e22e7a1</code></a>
bump ggcr dep to <a
href="https://github.com/main"><code>@​main</code></a> (<a
href="https://redirect.github.com/google/ko/issues/976">#976</a>)</li>
<li><a
href="8e075ae1f1"><code>8e075ae</code></a>
fix file extension for cyclonedx (<a
href="https://redirect.github.com/google/ko/issues/974">#974</a>)</li>
<li><a
href="11670b7498"><code>11670b7</code></a>
fix: handle docker's unknown/unknown platform in index manifests (<a
href="https://redirect.github.com/google/ko/issues/975">#975</a>)</li>
<li><a
href="7ce947817e"><code>7ce9478</code></a>
fix cosign by adding --yes (<a
href="https://redirect.github.com/google/ko/issues/973">#973</a>)</li>
<li><a
href="9302da78dc"><code>9302da7</code></a>
Bump k8s.io/apimachinery from 0.26.1 to 0.26.2 (<a
href="https://redirect.github.com/google/ko/issues/972">#972</a>)</li>
<li><a
href="a1588838ba"><code>a158883</code></a>
Bump sigstore/cosign-installer from 2.8.1 to 3.0.1 (<a
href="https://redirect.github.com/google/ko/issues/971">#971</a>)</li>
<li><a
href="86b6c2854f"><code>86b6c28</code></a>
Bump actions/checkout from 2 to 3 (<a
href="https://redirect.github.com/google/ko/issues/966">#966</a>)</li>
<li><a
href="0bd12fb106"><code>0bd12fb</code></a>
Bump slsa-framework/slsa-github-generator from 1.2.1 to 1.5.0 (<a
href="https://redirect.github.com/google/ko/issues/967">#967</a>)</li>
<li><a
href="d5125daacd"><code>d5125da</code></a>
Bump github.com/sigstore/cosign/v2 from 2.0.0-rc.2 to 2.0.0 (<a
href="https://redirect.github.com/google/ko/issues/965">#965</a>)</li>
<li><a
href="03f4aed682"><code>03f4aed</code></a>
add ko community meeting details (<a
href="https://redirect.github.com/google/ko/issues/938">#938</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/google/ko/compare/v0.12.0...v0.13.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/google/ko&package-manager=go_modules&previous-version=0.12.0&new-version=0.13.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>
2023-03-29 14:38:57 -03:00
Carlos A Becker
4ada24b6a8
refactor: remove unused function
refs f4fad65471
refs #3891

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-29 13:25:26 -03:00
Carlos A Becker
f4fad65471
fix: improve gpg.program detection, add more tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-29 13:23:23 -03:00
Carlos Alexandro Becker
9a97aaae99
fix: improve brew no archive error (#3895)
similar to #3894, but for homebrew

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-29 10:24:53 -03:00
Carlos Alexandro Becker
37e92ce2f1
fix: clarify scoop no windows error (#3894)
improve error message and related docs

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-29 10:18:40 -03:00
Go Compile
d83d362b96
fix(sign): use gpg path from git config by default if it is set (#3891)
Fixes issue #3890 by checking the user's git `gpg.program`
configuration. If the user didn't set this value it will use the default
"gpg", just like before this PR.

No need to add a additional unit test as your existing tests cover it
(mostly); however, a comment has been added to that check, informing the
reader that the test environment assumes `git config gpg.program` is not
be set.
2023-03-27 12:00:24 -03:00
Carlos Alexandro Becker
723484d157
fix: do not skip scoop on draft releases (#3889)
all other pipes don't, not sure why scoop was doing it.

closes #3887
2023-03-24 00:02:15 -03:00
Carlos Alexandro Becker
f82a32cd3a
feat: blobs.disable (#3884)
Allows to template-disable specific blob configurations.

Closes #3883
2023-03-23 08:59:04 -03:00
Carlos A Becker
7229a0dab0
refactor: pipe.Skipf 2023-03-22 23:49:48 -03:00
Maxime Brunet
c47315fead
feat(ko): support labels and creation times (#3852)
* Add a `labels` key-value map to the `kos` config.
My interest is to be able to label the built images:
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#labelling-container-images
* Add creation times to allow using the commit timestamp as meaningful
creation time
2023-03-20 16:05:44 -03:00
howieyuen
1f56d8e088
feat: scoop shortcuts (#3846)
close: https://github.com/goreleaser/goreleaser/issues/3845
2023-03-20 09:21:44 -03:00
Ivan Vandot
8877fe1ef4
feat: include prerelease suffix in git (#3841)
<!--

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 commit will fix bad version tag sort if there is a prerelease on
the same commit as a release tag. Current output is shown below
```
❯ git tag --points-at HEAD --sort=-version:refname --format='%(creatordate)%09%(refname)'
Thu Mar 2 21:38:51 2023 +0300   refs/tags/v1.13.0-rc3
Thu Mar 2 21:38:51 2023 +0300   refs/tags/v1.13.0
```
Test is changed to match current default value so it will fail without
this fix.

Default value `-` is set to the one that is described inside
[docs](https://goreleaser.com/how-it-works/?h=prerelease#how-it-works),
but people are still allowed to change it.

Output with fix applied
```
❯ git -c versionsort.suffix=- tag --points-at HEAD --sort -version:refname --format='%(creatordate)%09%(refname)'
Thu Mar 2 21:38:51 2023 +0300   refs/tags/v1.13.0
Thu Mar 2 21:38:51 2023 +0300   refs/tags/v1.13.0-rc3
```

<!-- # Provide links to any relevant tickets, URLs or other resources
-->
More info about `versionsort.suffix` can be found
[here](https://github.com/git/git/blob/master/Documentation/config/versionsort.txt#L5)

Docs as well both schemas are updated as well.

I am not sure if users should be allowed to change this option at all.
2023-03-19 22:19:40 -03:00
Carlos A Becker
a459911f45
fix: many linting issues
refs #3874

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-19 22:17:18 -03:00
Maxime Brunet
53277590f5
fix(ko): disable SBOM when sbom is none (#3861) 2023-03-10 23:31:46 -03:00
Carlos Alexandro Becker
82144cb2c0
test: improve file not found checkings (#3831)
using `errors.Is` everywhere, as file not found errors have different
messages on different OSes.
2023-03-04 12:16:26 -03:00
Carlos Alexandro Becker
874d698564
feat: add healthcheck cmd (#3826)
here's an idea: `goreleaser healthcheck`

It'll check if the needed dependencies (docker, git, etc) are available
in the path... this way users can preemptively run it before releasing
or to debug issues.

What do you think?

Here's how it looks like:

<img width="1007" alt="CleanShot 2023-03-02 at 23 24 26@2x"
src="https://user-images.githubusercontent.com/245435/222615682-d9cd0733-d900-43d1-9166-23b2be589b3a.png">

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-03 09:50:15 -03:00
Carlos Alexandro Becker
b6dd26c091
feat: infer package name from go.mod (#3827)
If all other strategies fail, try to infer the `package_name` property
from the `go.mod` file, using its last segment as the actual package
name.

This is not perfect, but usually this will only be used when running
against a new project, with no git url, empty/default config, etc... so,
in reality, it'll rarely be used.

closes #3825

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-03 09:50:02 -03:00
Carlos Alexandro Becker
2920de7cec
feat: templateable changelog.skip (#3830)
closes #3828
2023-03-03 09:49:41 -03:00
Carlos Alexandro Becker
be3a1b22d4
fix: create temp docker outside dist (#3823)
Creating the temp dir for docker builds was required back in the day
because we symlinked the files, so to avoid different filesystems et al,
this was the easier solution.

Since many versions ago, we switched to copying the files instead, which
works a lot better.

This also means we don't need the dist check for extra files anymore, as
long as we create the temp outside dist.

All that said, this PR does 2 things:
- changes the docker pipe to create the dist in the user's tempdir
instead of dist
- removes the dist path check for docker's extra files

closes #3790
closes #3791
2023-03-02 21:01:33 -03:00
Carlos Alexandro Becker
9e21511300
feat: cosign update (#3821)
cosign v2 update!

- need to use `--yes` to auto-approve prompts

cc/ @cpanato anything else I'm missing?

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-02 15:11:43 -03:00
Carlos Alexandro Becker
d5151a6eb0
feat: ConventionalExtension on nFPM (#3822)
closes  #3799

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-02 14:35:55 -03:00
Carlos Alexandro Becker
f544c5ce69
test: testctx pkg (#3807)
alternative to #3806 

the idea is that both `context.New` and `context.Context{}` are never
used in tests.

not sure yet how much I like it, so far code does look a bit more
readable though.

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-02 00:01:11 -03:00
Carlos Alexandro Becker
53838da8ac
fix: smtp mixup of env and yaml opts (#3815)
it was forcing to provide the same information as env and yaml.

this should fix it.

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-01 01:38:53 -03:00
Carlos Alexandro Becker
acc9eea154
feat(deps): update env to v7 (#3814)
env v7!

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-01 01:20:37 -03:00
Carlos Alexandro Becker
4f7475eee1
fix: meta archives make the other archives be ignored (#3804) 2023-02-24 14:58:09 -03:00
Carlos Alexandro Becker
702164076d
fix: skip publish on exec (#3800) 2023-02-22 23:13:34 -03:00
Carlos Alexandro Becker
9dfa94cbb3
feat: scoop depends (#3797)
closes #3796

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-02-22 09:18:44 -03:00
Carlos Alexandro Becker
1858bace7e
fix: nfpm replacements deprecation (#3793)
closes  #3792

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-02-21 21:54:18 -03:00
Carlos Alexandro Becker
2c80588251
fix: better handle password protected keys (#3788)
password-protected keys would give path errors, which was simply not
right.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-02-20 13:18:12 -03:00
John Olheiser
6c21b01586
feat: add OpenCollective (#3753)
This PR adds [OpenCollective](https://opencollective.com) as an
announcement pipeline.

![Screenshot from 2023-02-03
00-11-18](https://user-images.githubusercontent.com/42128690/216525902-31e1f358-3c3d-4c1c-9d71-402170a8a0e6.png)

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-02-09 09:11:47 -03:00
Carlos Alexandro Becker
99ae082237
feat: finally deprecate the single build option (#3758)
This option was still being supported, even though undocumented, for
many years now.

I think it's finally time to sunset it for good, in 6 months :)

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-02-09 08:56:37 -03:00
Carlos Alexandro Becker
81914757da
build: use go1.20 (#3757)
update everything to go 1.20

---------

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>
2023-02-05 13:39:39 -03:00
Carlos Alexandro Becker
7c6bd86b28
fix: do not do fancy 3rd party process logging (#3747)
do not write fields et al, let it just roll, otherwise its too noisy,
and we might expose things we are not supposed to.

closes #3741

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-02-01 23:25:36 -03:00
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