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

364 Commits

Author SHA1 Message Date
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
c06ba3a94f
feat: publishers.disable (#4239)
allows to disable a specific custom publisher based on a template, akin
to other pipes.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-08-08 22:43:09 -03:00
Carlos Alexandro Becker
bbe2ee7bfb
refactor: properly annotate deprecated options
Removed unused, deprecated stuff.
2023-08-04 14:47:54 +00: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
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
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
e3f494fdc9
fix: jsonschema for builds.hooks
closes #4197
2023-07-20 00:22:05 +00:00
Carlos Alexandro Becker
4105d285e6
fix: chocolatey jsonschema
closes #4194
2023-07-18 11:58:34 +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
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
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
Hidde Beydals
9f6a810fbc
Support make_latest for GitHub release (#4161)
This commit adds a `make_latest` boolean to the release configuration,
to allow signaling to GitHub if the release should be marked as latest.

Albeit being a boolean, the internal Go type is a string to allow
to distinguish an empty string (default behavior: `true`) from an
explicit `false`.

For more information around the GitHub API field, see

https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release

I did not include the `legacy` option, to not adopt something which
appears to be scheduled for removal in the future.

In addition, I opted for `make_latest` over `latest` because the
option is only available for GitHub. Which keeps the latter key
reserved for e.g. future use of a config option which is used across
Git providers.

Fixes #4159

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-13 22:42:20 -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
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
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
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
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
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
73b322579e
feat: improve deprecations
pending https://github.com/invopop/jsonschema/pull/79 the jsonschema should also have the correct deprecated markings

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-14 04:01:54 +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
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
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
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
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
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
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
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
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
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
fb64a52ca0
fix: http uploads not setting defaults according to docs
fixes #3959
2023-04-28 01:10:56 +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
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
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
Maxime Brunet
b36e30a071
fix(jsonschema): add binary to Archive format enum (#3924) 2023-04-10 21:51:26 -03:00
Carlos A Becker
c41d6de833
feat: support tgz and txz as archive formats
We support `.tar.gz` since the beginning, and `.tar.xz` for a long time.

`.tgz` and `.txz` are just commonly used shorthands for the same
formats.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-08 02:40:54 +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
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