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

35 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
ccd8c55b4f
test: run testifylint -fix (#4483)
fix a bunch of tests

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-17 15:34:28 -03:00
Carlos Alexandro Becker
739490290f
test: improve more tests (#4124) 2023-06-18 11:58:17 -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
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
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
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 A Becker
b9241a444c
docs: add more podman details
refs https://github.com/goreleaser/goreleaser/issues/3538
2022-11-08 23:15:12 -03:00
Carlos A Becker
ff0eeaca35
fix: improve tar error handling 2022-08-22 22:06:20 -03:00
Carlos Alexandro Becker
5a6dd2fbc8
test: reducing test ouput (#3222)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-07-04 21:13:10 -03:00
Carlos Alexandro Becker
0db84b24f5
fix: archive should not actually verify links (#3103)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-13 13:55:01 -03:00
Carlos Alexandro Becker
5d9110ab43
refactor: improve archive pipe (#3100)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-11 21:54:28 -03:00
Carlos Alexandro Becker
f632056820
feat: faster archiving with pgzip (#2941)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-02-27 13:16:08 -03:00
Carlos Alexandro Becker
c08bb7f24c
refactor: order methods
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-08-31 23:19:10 -03:00
Carlos Alexandro Becker
990fb63aef
feat: allow to use .tar as archive format
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-08-31 23:09:18 -03:00
Carlos Alexandro Becker
8858049a28
refactor: tar logic
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-08-31 23:08:57 -03:00
Carlos Alexandro Becker
275e17bc76
feat: support links inside archives (#2436)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-08-31 23:08:07 -03:00
Carlos Alexandro Becker
7f40922ea2
chore: gofumpt
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-07-23 23:54:13 -03:00
Carlos Alexandro Becker
73641c71ac
feat: file mappings in archives (#2347)
* refactor: archive files

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* feat: better archives

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* feat: better archives

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: test todos

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: go mod tidy et al

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: improve docs and remove typoe 'licence' from defaults

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: fixes

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: error string

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: remove some logs

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: use utc

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-07-21 22:09:02 -03:00
Carlos Alexandro Becker
860b4a8f81
chore: gofumpt & lint (#2190)
Signed-off-by: Carlos Becker <caarlos0@gmail.com>
2021-04-25 14:20:49 -03:00
Carlos Alexandro Becker
5866b9cb63
refactor: use os and io packages intead of ioutil when possible (#2189) 2021-04-25 13:00:51 -03:00
Carlos Alexandro Becker
66117f3126
fix: several fd leaks (on tests) (#2187) 2021-04-25 11:34:40 -03:00
dependabot[bot]
1b0b6be8c5
chore(deps): bump github.com/golangci/golangci-lint from 1.33.0 to 1.34.1 (#1975)
* chore(deps): bump github.com/golangci/golangci-lint

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.33.0 to 1.34.1.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.33.0...v1.34.1)

Signed-off-by: dependabot[bot] <support@github.com>

* fix: lint issues

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: go mod tidy

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-12-29 15:40:21 +00:00
Carlos Alexandro Becker
92f52ac406
refactor(test): use testing.TB Cleanup and Tempdir (#1945)
* refactor: use t.Cleanup instead of defer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use t.Cleanup instead of defer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use t.Cleanup instead of defer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use t.Cleanup instead of defer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: filepath

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-12-12 13:27:35 -03:00
Carlos Alexandro Becker
979f8632b7
refactor: use require on all tests (#1839)
* refactor: use require on all tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use require on all tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-06 12:48:04 +00:00
Carlos Alexandro Becker
69c8a502db
chore(deps): bump github.com/golangci/golangci-lint from 1.23.7 to 1.27.0 (#1563)
* chore(deps): bump github.com/golangci/golangci-lint from 1.23.7 to 1.27.0

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-05-26 00:48:10 -03:00
J Taylor
081430bcc7
feat: xz compression (#1422)
* feat: xz compression

* remove .xz feature

* fix: format code with gofmt

* use larger dict for better compression

* Update pkg/archive/tarxz/tarxz.go

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2020-04-13 12:53:03 +00:00
John Taylor
e2ef52032b
feat: use maximum compression for gzip and zip archives (#1416)
* feat: use maximum compression for gzip and zip archives

* fix: add comment for skipping error check

Co-authored-by: John Taylor <ec2-user@ip-172-31-29-117.ap-south-1.compute.internal>
2020-04-01 19:05:20 +00:00
Carlos Alexandro Becker
d2fa6d5821
feat: support gzip format (#959)
* feat: support gzip format

* fix: wrong .gz detection

* docs: gz + multiple build
2019-02-07 12:12:20 -02:00
Carlos Alexandro Becker
236aabdff5
fix: gosec lint issues 2018-09-04 09:48:22 -03:00
Carlos Alexandro Becker
431c28b2bd
fix: gosec lint issues 2018-09-04 09:26:45 -03:00
Carlos Alexandro Becker
64b1f14a86
refactor: better code organization (#757)
* refactor: merging archive in the same repo

* refactor: merging archive in the same repo

* refactor: better organizing packages

* refactor: fixing renames

* fix: new dep version

* fix: makefile

* fix: zip/tar tests

* fix: gitigonore

* fix: s3 tests

* fix: archive test
2018-08-14 23:50:20 -03:00
Julien Duchesne
f0413af071 fix: Zip files were no longer being compressed (#748) 2018-08-06 15:37:37 -03:00
Carlos Alexandro Becker
32fd1e158c
refactor: merging archive in the same repo (#746)
* refactor: merging archive in the same repo

* refactor: merging archive in the same repo
2018-08-05 10:23:39 -03:00