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>
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>
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>
- 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>
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#2556closes#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>
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>
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>
<!--
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
-->
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>
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>
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>
<!--
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?
<!--
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>
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>
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>
`--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>
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>
* 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>
* 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>
* 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>
* 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>