1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00
Commit Graph

55 Commits

Author SHA1 Message Date
Julien Salleyron
40668d4382
fix(build): c-shared build and release when target is wasm (#5128)
This commit fixes the automatic extension when building the wasip1_wasm
target.

Additionally, in future Go versions, support will be added for
generating c-shared WASM binaries.
https://github.com/golang/go/issues/65199


Therefore, this PR corrects the extension in the build process and
removes the .h file from the release when c-shared is enabled and the
target is WASM.
2024-09-09 22:25:54 -03:00
Carlos Alexandro Becker
301b193e6e
feat(build): templateable no_unique_dist_dir (#5115)
closes https://github.com/goreleaser/goreleaser/issues/5024

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-09-07 11:09:06 -03:00
Carlos Alexandro Becker
11aa7cfceb
feat(build): template skip (#5089)
closes #5071
2024-08-18 16:57:59 -03:00
Carlos Alexandro Becker
ec2db4a727
feat!: rename module to /v2 (#4894)
<!--

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

...

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

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-05-26 15:02:57 -03:00
Carlos Alexandro Becker
4fa8df6413
feat!: v2 (#4806)
BREAKING CHANGE

removed all deprecated options, config file should now have a `version:
2` bit


![Dont
Matter](https://github.com/goreleaser/goreleaser/assets/245435/31ece16a-cb70-4e43-9caa-8364e73fbeb9)

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-05-25 14:09:49 -03:00
Oleksandr Redko
00a376cc64
refactor: remove unneeded in Go 1.22 loop var copy (#4856)
The PR cleans up unnecessary loop variable copying and enables the
[`copyloopvar`](https://golangci-lint.run/usage/linters/#copyloopvar)
linter for detecting this redundant variable copying.

#### Additional notes

After the project upgraded to Go version 1.22 in #4779, copying
variables inside a `for` loop became unnecessary. See this [blog
post](https://go.dev/blog/loopvar-preview) for a detailed explanation.

The `copyloopvar` linter is only available from `golangci-lint` v1.57
onwards, so we also need to update this tool.
2024-05-12 13:21:13 -03:00
Carlos Alexandro Becker
c9068b4b3c
fix: properly template builds.gobinary
closes #4685
2024-03-16 11:50:51 -03:00
Carlos Alexandro Becker
22fa9947c8
feat: allow to template builds.gobinary (#4454)
closes #4453

TODO: tests
2023-12-04 23:00:11 -03:00
Carlos Alexandro Becker
25a054c5e1
feat: improve --single-target (#4442)
closes #4437 
closes #4426

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-11-27 18:29:50 -03:00
Carlos Alexandro Becker
16d84c5973
feat: skip pre build hooks 2023-09-17 16:59:34 +00:00
Carlos Alexandro Becker
622c426eb3
refactor: --skip=item (#4272)
Laying the ground work to allow skipping more pipes without adding new
flags et al.

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-09-16 17:01:20 -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
Carlos Alexandro Becker
1b8395d6b6
feat(build): allow to template env (#3592)
GoReleaser evolved a lot since the last time I tried to implement this
>1 year ago.
Now its 100% possible, and way simpler to do it!

closes #3580
refs #2583

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-25 15:26:29 -03:00
Carlos A Becker
22a7a9a835
refactor: small improvements
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-11 23:42:52 -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 Alexandro Becker
1d72e963f4
feat: allow parallelism by build target (#3213)
* Trying to fix parallelism on multiple builds issue

https://github.com/goreleaser/goreleaser/issues/3209

* bugfixing

* Update internal/pipe/build/build_test.go

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

* Update internal/pipe/build/build_test.go

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

* Update internal/pipe/build/build_test.go

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

* fix: gofumpt

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

Co-authored-by: JD <jdpcbs@gmail.com>
2022-06-29 00:31:33 -03:00
Carlos Alexandro Becker
fe7e2123bd
feat: replacing the log library (#3139)
* feat: replacing logs

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

* fix: tests et al

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

* feat: update termenv/lipgloss

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

* wip: output

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

* fix: pin dep

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

* fix: update

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

* fix: tests

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

* fix: tests

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

* fix: deps

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

* fix: dep

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-21 21:11:15 -03:00
Carlos A Becker
17e4d62791
fix: revert defaulting build.id to build.binary
refs #3098
refs #3063

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-11 11:42:37 -03:00
Carlos Alexandro Becker
5aeb8ace61
fix: prevent folder collisions in builds and universal binaries (#3063)
- on universal binaries, use the build id instead of the binary name to
  create the folder in the dist folder
- on builds, default the id the to the binary name instead of project
  name. The binary name already defaults to the project id if empty, so
  this should only prevent having to specify the id + binary name in
  some cases.

closes #3061

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-04-25 22:07:14 -03:00
Carlos Alexandro Becker
b0583c700b
feat: support GOAMD64 (#3016)
* feat: support GOAMD64

* fix: test

* wip

* wip: docker et al

* fix: archive format name

* test: added new test

* feat: nfpm amd4, mips et al

* chore: rm unused file

* fix: brew for multiple goamd64

* fix: krew

* feat: aur

* feat: krew

* docs: brew

* feat: gofis

* feat: scoop

* fix: docker filters

* fix: snapcraft

* fix: improve diff a bit

* fix: snapcraft name template
2022-04-11 22:43:22 -03:00
Carlos A Becker
9df62d87ec
fix: build log print relative path instead of abs
all other logs print relative paths, only the build logs are printing the abs path.

this makes things more even.

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-02-05 17:44:07 -03:00
Carlos A Becker
f585f3be69
feat: allow to output on hooks
refs #2875
2022-02-05 16:00:49 -03:00
Weslei Juan Novaes Pereira
f9b693edf0
feat: add hooks to universal binaries (#2684)
* add hooks for universal binaries

* task fmt
2021-11-23 15:53:12 -03:00
Carlos Alexandro Becker
01fa7a6827
refactor: organize config a bit (#2619)
* refactor: organize config a bit

* test: fix
2021-11-01 09:31:43 -03:00
Carlos Alexandro Becker
61bead8989
feat: improve output and pipe skipping (#2480)
* refactor: improve middleware

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

* fix: upload tests

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

* fix: twitter tests

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

* fix: source tests

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

* fix: snapshot tests

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

* test: improved some tests

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

* fix: snapcraft skip

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

* fix: skip slack

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

* fix: skip sign

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

* fix: skip scoop

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

* fix: skip reddit

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

* fix: skip discord

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

* fix: skip publish

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

* fix: skip nfpm

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

* fix: skip milestone

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

* fix: skip custompublishers

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

* fix: skip checksums

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

* fix: skip changelog

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

* fix: skip brew

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

* fix: skip blob

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

* fix: skip before

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

* fix: skip artifactory

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

* fix: skip announce

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

* fix: skip defaults

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

* fix: cmds

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

* fix: skip docker

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

* chore: todo

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

* fix: go.mod

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

* fix: skip release

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

* fix: remove old skip pipe errors

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

* fix: skip teams

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

* fix: skip brew

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

* fix/test: skip smtp

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

* fix: lint issues

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

* fix: skip docker

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

* fix: skip brew and scoop

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

* fix: skip docker

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

* fix: skip http/artifactory

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

* test: increase coverage

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

* test: fix

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-09-18 10:21:29 -03:00
Carlos Alexandro Becker
d77f862fa4
refactor: improve build (#2475)
* refactor: improve build

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

* test: coverage

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-09-11 13:01:57 -03:00
Carlos Alexandro Becker
bf19dc1079
feat: moving some cmd logs to debug (#2359)
* feat: moving some cmd logs to debug

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

* feat: moving some cmd logs to debug

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-07-23 12:09:29 +01:00
Carlos A Becker
a0dd45592e
fix: packaging with build.binary with subdir
Saving again the full path of the binary in the artifact name, if needed, we can filepath.Base it and get the name only.

refs #2280
closes #2311

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-06-26 16:57:10 +00:00
Carlos Alexandro Becker
c49c771220
feat: builds. no_unique_dist_dir (#2280)
* Implemented build option output_path

* feat: output path renamed to dist_path

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

* fix: CR

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

* fix: binary name

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

Co-authored-by: Thomas Meckel <tmeckel@users.noreply.github.com>
2021-06-06 19:44:24 -03:00
Carlos Alexandro Becker
740ab6f2bd fix: remove replace
closes #2080

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-03-22 08:45:18 -03:00
Sylvia Moss
6d9abe6299
feat: add Os and Arch template options to the Binary name field (#1936)
* allow Os and Arch tmpl variables in binary name

* update documentation

* fix docs
2021-01-12 20:27:46 +00:00
Carlos Alexandro Becker
032a105533
feat: validate goos, goarch, goarm and gomips (#1886)
* feat: validate goos, goarch, goarm and gomips

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

* fix: lint

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

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-11-05 07:20:14 +00:00
Carlos Alexandro Becker
65ffbf1921
refactor: replace pkg/errors.Wrap with fmt.Errorf (#1812)
* refactor: remove pkg/errors

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

* refactor: remove pkg/errors

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

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-09-21 17:47:51 +00:00
Carlos Alexandro Becker
6eae126445
feat: log build hooks (#1752)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-08-15 14:18:31 -03:00
dependabot[bot]
04f8656430
chore(deps): bump github.com/golangci/golangci-lint from 1.29.0 to 1.30.0 (#1718)
* chore(deps): bump github.com/golangci/golangci-lint

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.29.0 to 1.30.0.
- [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.29.0...v1.30.0)

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

* fix: lint issues

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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-04 03:21:26 +00:00
Till!
841eab183c
feat: make goos and goarch available in hooks (#1702) 2020-07-23 18:46:43 +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
Radek Simko
983f342ab8
feat: Add build command (#1520)
* feat: Add build command

* feat(cmd/build): Add skip-post-hooks flag

* Update internal/pipeline/pipeline.go

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

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2020-05-15 11:19:20 -03:00
Carlos Alexandro Becker
34c8fd4724
fix: better shellwords on hooks (#1437)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-04-12 14:12:53 -03:00
Radek Simko
8032d12052
feat(pipe/build): Add support for flexible build hooks (#1414) 2020-04-12 12:13:20 -03:00
Radek Simko
cfa0cc2d2a
feat(pipe/build): Report hook error in addition to stdout (#1430)
This helps in situations where hook couldn't run at all,
e.g. because of insufficient permissions.

Previously such failure would only be reported as
empty stdout/stderr output - this allows exposure
of the real root cause.
2020-04-12 10:44:12 -03:00
Leonardo Grasso
1cf9100ecc
feat: build.skip option, support for library projects (#1419)
* fix: checksum pipe will not return an error when artifact list is empty

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>

* new: build.skip option for libraries

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>

* docs: update doc with build.skip option

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-04-02 13:18:05 +00:00
Tadej Janež
1943d3147b feat: specify (sub)directory with go code when building (#1273) 2020-01-13 14:23:00 -03:00
Quim Muntal
1cf86b86f6 feat: Add support for c-shared and c-archive build modes in windows (#1243)
* add hardcoded .dll and .lib extensions

* chore: remove unnecessary else case
2019-11-15 10:43:40 -03:00
Carlos Alexandro Becker
9d5f36f21b
feat: wasm support (#1159)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-10-01 16:00:44 -03:00
Carlos Alexandro Becker
8286402e3e
fix: better duplicate ID message
refs #1090

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-07-27 10:55:56 -03:00
Carlos Alexandro Becker
f656e68ef9
fix: non-templateable field as default build.id (#1060)
* fix: non-templateable field as default build.id

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

* test: added test for build.id

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

* test: fixed test

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-06-28 08:52:10 -03:00
Carlos Alexandro Becker
7ee486fc9b
fix: build with same binary name (#1041) 2019-06-09 12:14:30 -03:00
Carlos Alexandro Becker
c98d3881f7
refactor: id validations (#1015) 2019-05-07 07:18:35 -03:00
Carlos Alexandro Becker
b8f5901265
feat: multiple archives (#942)
* feat: multiple archives

* fix: several things

* test: fixed

* fix: several things

* fix: archive id on the artifact

* fix: deprecated since

* docs: deprecations page improvements
2019-04-16 10:19:15 -03:00