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

307 Commits

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