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

896 Commits

Author SHA1 Message Date
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