1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-04 03:11:55 +02:00
Commit Graph

407 Commits

Author SHA1 Message Date
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
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
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
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
2920de7cec
feat: templateable changelog.skip (#3830)
closes #3828
2023-03-03 09:49:41 -03:00
Carlos Alexandro Becker
e6159a1283
fix: remove unused field (#3817)
this is not being used, so... let's delete

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-01 14:47:17 -03:00
Carlos Alexandro Becker
2634fbdad4
fix: race condition on artifacts.List (#3813)
I have no idea why this never happened before... the lock was
ineffective in `artifacts.List`, which should have caused at least some
race condition at some point.

Anyway, got it once locally while working on another feature, and
couldn't believe my eyes.

Fixed, thank goodness!

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-01 01:05:30 -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
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
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
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
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
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
2257b63414
fix: telegram.chat_id string
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-07 17:53:40 -03:00
Carlos A Becker
0286cf7163
fix: schema
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-07 17:10:46 -03:00
Carlos A Becker
13fda95e0e
docs: update schema for changelog.sort
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-04 22:31:46 -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
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
d7ce4841c8
fix: jsonschema for chocolateys
closes #3647

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-18 16:42:03 -03:00
Carlos Alexandro Becker
2e5a8e5a54
feat: allow to template archives.files.info (#3630)
this allows to template the owner, group and mtime in file infos inside
archives.

should help towards reproducible builds!

goes well with #3618

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-14 12:16:43 -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
Ori Rawlings
19ab124f1b
fix: retain symlinks added to zip archives (#3585)
<!--

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

fixes #3584 

When following the reproduction steps in #3584 I now get the following
contents for the zip archive:
```
$ goreleaser --snapshot --skip-publish
...
$ (mkdir thezip && cd thezip && unzip ../dist/test_0.0.0-SNAPSHOT-none_darwin_amd64.zip) && ls -lR thezip
Archive:  ../dist/test_0.0.0-SNAPSHOT-none_darwin_amd64.zip
  inflating: a/x                     -> ../x 
  inflating: a/x2                    -> x 
  inflating: x                       
  inflating: test                    
finishing deferred symbolic links:
  a/x                    -> ../x
  a/x2                   -> x
total 1640
drwxr-xr-x  4 orawlings  staff     128 Nov 22 16:19 a
-rwxr-xr-x  1 orawlings  staff  833104 Nov 22 16:19 test
-rw-r--r--  1 orawlings  staff       2 Nov 22 15:32 x

thezip/a:
total 0
lrwxr-xr-x  1 orawlings  staff  4 Nov 22 16:19 x -> ../x
lrwxr-xr-x  1 orawlings  staff  1 Nov 22 16:19 x2 -> x
```

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

I'm using goreleaser for a project that packages multiple binaries in
zip archives. We also include symlinks within the zip archives to give
some of the binaries an alternate (usually shorter) spelling so they are
easier to invoke on the command line.

This brings the zip archive behavior regarding symlinks in line with
tar.gz and tar archives.

<!-- # Provide links to any relevant tickets, URLs or other resources
-->
2022-11-29 22:05:18 -03:00
Carlos Alexandro Becker
e72ab30ac8
fix: improve schema for signs (#3603)
adds all the options allowed in the `artifacts` field to the schema

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-29 21:38:51 -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
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 Alexandro Becker
ee6225fb5e
docs: improve schema (#3553)
this should prevent yamlschema from complaining on some fields that
accept an integer or string (goarm) and a bool or string (skip*)

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-14 15:01:24 -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
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
Carlos A Becker
b9241a444c
docs: add more podman details
refs https://github.com/goreleaser/goreleaser/issues/3538
2022-11-08 23:15:12 -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
a42c8ae706
feat: aur backup (#3366)
closes #3353
2022-10-05 09:42:17 -03:00
Carlos Alexandro Becker
f3849e2bbe
fix: client key and cert should not be required (#3409)
closes #3407

Signed-off-by: Sheridan C Rawlins <scr@yahooinc.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Sheridan C Rawlins <scr@yahooinc.com>
2022-09-27 10:12:34 -03:00
Carlos Alexandro Becker
8cb4eb1654
fix: ruleguard and semgrep scans and fixes (#3364)
run semgrep-go ruleguard and semgrep scans

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

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-09-11 15:32:23 -03:00
Carlos Alexandro Becker
efdba10f58
fix: guard changelog commit abbrev behind config (#3349)
this allows the user to specify the abbrev lenght to use, and will also add the option to omit the commit hash altogether by setting it to -1.
default is doing nothing

closes #3348

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-30 12:04:01 -03:00
Carlos Alexandro Becker
d7acf21f03
fix: source archive add subfolders (#3343)
`--add-file` adds only the `--prefix` joined with the basename of the added file, so, adding a folder like `vendor` would break havoc.

this basically writes our own source archives (which are more compressed) and allows to add an entire folder easily, as well as other mappings as `archives` already supports. 

refs #3102 #2911

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-25 02:15:37 -03:00
Carlos Alexandro Becker
e67975ea99
feat: add extra files to source archives (#3102)
closes https://github.com/goreleaser/goreleaser/issues/2911

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-25 01:10:26 -03:00
Carlos A Becker
ff0eeaca35
fix: improve tar error handling 2022-08-22 22:06:20 -03:00
Carlos A Becker
797a1ccc5f
feat: release with target_commitish in another repo
We should not imply the target_commitish, as some users might want to
have the code in one repo and the releases in another (e.g. private
code, public releases), so the commit might not be there.

We should instead allow the user to set the `target_commitish` (or not),
and pass it down to the github api.

refs 95bba02211
refs #3044
refs #3330

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-22 21:31:28 -03:00
Carlos A Becker
ce264f1fca
fix: jsonschema
very hacky, fixes #3238 for good

refs https://github.com/invopop/jsonschema/issues/26

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-17 23:50:14 -03:00
Carlos Alexandro Becker
6d000e5cb1
feat: allow to specify version of brew deps (#3319)
* feat: add version for homebrew dependencies

* resolve conflicts

* resolve conflicts

* feat: allow to specify version of brew deps

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

* docs: brew

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

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Purushotham <purushotham@hasura.io>
2022-08-17 22:58:41 -03:00
Carlos Alexandro Becker
aeccdb6a15
feat: replace existing draft releases on github (#3318)
* fix: duplicate draft release

* golint

* delete existed release assets before append draft

* feat: replace existing draft releases on github

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

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: qsliu <qsliu2017@outlook.com>
2022-08-17 22:33:16 -03:00
Carlos Alexandro Becker
3f60327964
feat: nfpm changelog support (#3309)
closes #3259

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

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-16 02:05:46 -03:00
Carlos Alexandro Becker
08e7038a20
feat: remove gofish (#3312)
* feat: remove gofish

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

* fix: remove more unused code

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

* fix: remove more references

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

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-16 01:16:45 -03:00
Carlos Alexandro Becker
5cfc78d92c
feat: gitlab option to use_job_token (#2993) 2022-08-16 00:39:13 -03:00
Carlos Alexandro Becker
4da595ed26
feat: strip_parent_binary_folder (#3261)
* feat: strip_parent_binary_folder

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

* docs: clarify dir

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

* fix: fmt

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

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-15 22:53:36 -03:00
Sheridan C Rawlins
53ed81665b
feat: mTLS with client certificate (#3302)
* Support mTLS with client certificate when configured.

* Fix the omitempty typo.

* Add check for missing cert as well.

* Added documentation for artifactory and upload, as well as how to run mkdocs locally

* set pip version to just 3.

* Added example to the full config.

* Remove the Pipfile and update documentation to mention the task.

* update language in doc about multiarch images.

Co-authored-by: Sheridan C Rawlins <scr@ouryahoo.com>
2022-08-12 09:44:54 -03:00
Carlos A Becker
fa61448ded
feat: support provides field in nfpm config
refs #3259

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-07 12:13:20 -03:00
Carlos Alexandro Becker
5a433347ac
feat: allow to skip scm release uploads (#3282)
* feat: allow to skip scm release uploads

refs #3268

* chore: schema update

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-06 18:59:59 -03:00
Carlos A Becker
ebd2afdf3c
fix: jsonschema
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-04 15:30:25 -03:00
Carlos A Becker
7f2b50b94d
fix: jsonschema
hopefully fixes #3238

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-07-26 09:20:32 -03:00
Carlos A Becker
6fdb41f4af
fix: jsonschema
hopefully fixes #3238

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-07-26 09:18:30 -03:00