1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-29 01:44:39 +02:00
Commit Graph

121 Commits

Author SHA1 Message Date
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
Oleksandr Redko
6505654c86
fix: fix nolintlint issues (#4854)
The PR enables
[`nolintlint`](https://golangci-lint.run/usage/linters/#nolintlint)
linter and fixes up appeared issues.

Changes:

- Enable `nolintlint` in `.golangci.yml` config.
- Remove unused `//nolint:` comments.
- Fix `nolint` comment format by removing spaces (`// nolint: dupl` ->
`//nolint:dupl`)

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-05-12 14:11:11 -03:00
Steven Hartland
9c4d626e4e
chore: remove comment about WSL failure (#4201) 2023-07-20 17:01:59 -03:00
Carlos Alexandro Becker
323dca8048
fix: version git tree state
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-27 11:35:06 +00:00
Carlos Alexandro Becker
45b80dfa26
fix: pass tree state as ldflag (#3968)
needs #3967

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-02 01:04:48 -03:00
Carlos Alexandro Becker
d62abe0b16
fix: pass goversion.Info instead of string
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-04-30 17:26:17 +00:00
Carlos Alexandro Becker
9aeea7b430
feat: new --version output (#3962)
using the same output as most cloud-native Go-written CLI's use, i.e.
using
[sigs.k8s.io/release-utils](https://github.com/kubernetes-sigs/release-utils).

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-04-30 14:19:55 -03:00
Carlos Alexandro Becker
6afe717dc9
fix: do not fatal on automaxprocs error (#3946)
This might fail on windows/wsl (see
https://github.com/uber-go/automaxprocs/issues/65), and its not too bad
if it fails, actually, so, let's just warn the error instead of exiting
1

closes #3945



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

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-04-17 21:10:09 -03:00
Kazuki Matsumaru
b495c905d5
fix: set parallelism to match Linux container CPU (#3901)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->

Currently Goreleaser uses `runtime.NumCPU()` as the default value if
`--parallelism` is not set.
However, this will get the number of CPUs on the host even when
Goreleaser is run in a container with a limit on the maximum number of
CPUs that can be used (typically in a Kubernetes pod).
Actually, `docker run --cpus=1 goreleaser/goreleaser --debug` shows
`parallelism: 4` on my machine.
This behavior causes CPU throttling, which increases execution time and,
in the worst case, terminates with an error.
I ran into this problem with Jenkins where the agent runs on pod
([Kubernetes plugin for
Jenkins](https://plugins.jenkins.io/kubernetes/)).

This commit introduces
[automaxprocs](https://github.com/uber-go/automaxprocs) to fix this
issue.
This library sets `GOMAXPROCS` to match Linux container CPU quota.
I have also looked for a library that can get CPU quota more directly,
but this seems to be the best I could find.
The reason it is set in a different notation from the automaxprocs
README is to prevent logs from being displayed
([comment](https://github.com/uber-go/automaxprocs/issues/18#issuecomment-511330567)).

I would have liked to write a test, but this change is dependent on the
number of CPUs in the execution environment, so I could not.
Instead, I wrote a Dockerfile for testing

```Dockerfile
FROM golang:1.20.2

WORKDIR /go/app
RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
COPY . .
RUN task build
```

and confirmed built binary shows expected parallelism by following
commands:

```sh
docker build --file Dockerfile.test . -t test-goreleaser
docker run --cpus=1 test-goreleaser ./goreleaser build --snapshot --debug # parallelism: 1
docker run test-goreleaser ./goreleaser build --snapshot --debug # parallelism: 4
```

I also ran the built binary on my Macbook and it was fine.
2023-04-02 17:16:41 -03:00
Carlos A Becker
fcc1856590
feat(deps): update caarlos0/log
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-08 09:26:09 -03:00
Carlos A Becker
a2d91a501a
feat: add more info to --version
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-12-17 16:39:55 -03:00
Carlos Alexandro Becker
0935faf8e2
test: fix broken test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-07-24 00:29:25 -03:00
Carlos Alexandro Becker
b97f29f1d7
fix: print website on version
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-07-23 23:26:19 -03:00
Carlos Alexandro Becker
8306b946d3
feat: initial proxy build support (#2129)
* feat: allow to use ModulePath on templates

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

* feat: initial proxy build support

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

* fix: build

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

* fix: main check

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

* fix: make it more flexible

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

* fix: small improvements

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

* fix: copy go.sum

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

* fix: root mod proxy

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

* fix: test

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

* fix: snapshots

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

* fix: lint

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

* fix: proxy main pkg

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

* fix: environment variables

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

* test: added some tests to go mod proxy feature

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

* fix: improve test

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

* fix: linte

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

* fix: goreleaser.yml

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

* fix: simplify tests

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

* test: test build

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

* fix: revert unwanted changes

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

* fix: allow to run when no mod.suym

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

* docs: example

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

* fix: not a go module on go 1.15

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

* docs: improve docs as per comments

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-03-30 21:06:25 -03:00
Carlos Alexandro Becker
4f7968316f
feat(ci): run lint on actions (#2087)
* feat: lint on specific ci step

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

* fix: run on push

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

* docs: contributing

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

* docs: contributing

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

* fix: action

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

* fix: lint issues

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

* fix: lint issues

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-03-01 14:45:06 -03:00
CrazyMax
955f7eee76
feat: Use tools.go paradigm for external dependencies (#1495)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-05-10 19:34:55 +00:00
Carlos Alexandro Becker
9bd0033c09
feat: refactor main.go to spf13/cobra (#1472)
* feat: refactor cli

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

* feat: refactor cli

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

* feat: refactor cli

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

* feat: refactor cli

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

* feat: refactor cli

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

* fix: revert

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

* feat: refactor cli

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

* feat: refactor cli

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

* feat: refactor cli

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

* fix: lint

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

* fix: move

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-04-27 21:42:44 -03:00
Carlos Alexandro Becker
a5f0343368
feat: improve check command (#1435)
* feat: improve check command

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

* fix: main test

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

* fix: tests

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

* fix: tests, finally

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

* fix: lint

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-04-12 14:31:35 -03:00
Carlos Alexandro Becker
65c9c12957
fix: goreleaser check (#1249)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-11-15 18:23:11 -03:00
Ivan Novikov
16cb4d8277 feat: Added new flags to support release notes header and footer. (#1212)
* Added new flags to support release notes header and footer.

Created two flags for release generation.
--release-footer
--release-header
These flags can help you to add custom changelog text before/after changes that are generated by git log.

* Fix changelog.go to avoid lint errors

* Fix test typo

* Added tests for main, fixed bug with no passing options to release ctx

* Add @caarlos0  suggestions
2019-11-15 10:22:11 -03:00
Carlos Alexandro Becker
7b84a2ccd7
fix: init broken on #1096
closes #1107

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-08-08 18:10:26 -03:00
Carlos Alexandro Becker
ba0e472247
feat: add goreleaser check (#1096)
* feat: add goreleaser check

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

* docs: added to deprecations.md

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

* docs: added to bug.md

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

* test: added tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-08-02 16:37:50 -03:00
Carlos Alexandro Becker
86c5b93260
feat: improved version command (#1028)
* feat: improved version command

* fix: typo

* test: fixed failing tests
2019-05-27 23:59:33 -03:00
Peter Götz
3387ffeada fix: warning when no config file could be found (#948) 2019-02-01 14:09:23 -02:00
Carlos Alexandro Becker
60e54a1368
refactor/fix: improved CLI (#937)
* refactor: added middleware for action logs/error handling

* refactor: moved custom changelog load from main.go

* fix/refactor: CLI improvements

* test: do not pollute ./dist
2019-01-22 01:56:16 -02:00
Carlos Alexandro Becker
17a894981f
fix: CLI improvements (#936)
* fix: CLI improvements

* fix: CLI improvements

* fix: CLI improvements

* chore: lint
2019-01-22 01:12:17 -02:00
Carlos Alexandro Becker
6c349c1759 fix: linter fixes 2018-11-08 09:40:23 -02:00
Carlos Alexandro Becker
7856c691cc fix: CI is not Travis 2018-10-27 13:34:16 -03:00
Carlos Alexandro Becker
4f36070338 fix: colored output on travis 2018-10-27 13:34:16 -03:00
Carlos Alexandro Becker
748869c83b
fix: example indentation 2018-10-16 23:09:37 -03:00
Carlos Alexandro Becker
23eb2c7756 fix: publish skip handling 2018-10-12 14:55:04 -03:00
Carlos Alexandro Becker
01189ba02b fix: improve goreleaser init 2018-10-04 22:37:27 -03:00
Carlos Alexandro Becker
39de856eb4
refactor: better package organization 2018-09-12 14:18:01 -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
Pablo Lalloni
b863a43558 fix: reduce code duplication 2018-06-25 10:01:31 -03:00
Pablo Lalloni
3b0f3f55c8 feat: support simple http put artifacts uploading
Supports doing simple http put requests for uploading artifacts.
Heavily based con Artifactory pipeline.
In archive mode uploads all archives and the checksums file.
In binary mode uploads just the binaries.
2018-06-25 10:01:31 -03:00
Yoan Blanc
92abd2e2fd feat: Add --skip-sign flag
The new flag `--skip-sign` as the same effect as saying
`artifacts: none`. It lets non GPG key owners (like Travis)
use it.

Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
2018-05-25 09:52:26 -03:00
Carlos Alexandro Becker
1c426847d9 feat: upload to s3 2018-05-13 17:02:29 -03:00
Dominik Schulz
cbdd90ddad feat: Add cleanup pipeline 2018-04-03 21:24:18 -03:00
Carlos Alexandro Becker
a2d89651da
chore: cli: added aliases for release and init 2018-03-11 12:09:19 -03:00
Carlos Alexandro Becker
2231742e76
chore: cli: placeholder for release notes 2018-03-11 12:03:35 -03:00
Carlos Alexandro Becker
8326751101
refactor: replacing urfave/cli with alecthomas/kingpin (#603)
* chore: wip adding kinpin

* chore: wip adding kinpin

* chore: wip adding kinpin

* chore: wip adding kinpin

* chore: wip adding kinpin

* chore: fix linter issues

* style: format

* chore: wording

* style: small fixes

* fix: improved exit

* test: more tests
2018-03-11 12:00:47 -03:00
Carlos Alexandro Becker
959daeca4d
style: moving Piper interface close to where its used 2018-03-08 18:46:15 -03:00
Carlos Alexandro Becker
3db9913e1c
feat: --skip-validate is back (#600) 2018-03-08 08:42:33 -03:00
Carlos Alexandro Becker
0f24a529da
fix: inline config (#592)
* fix: inline config

Simple is always better.

refs #591

* style: fmt
2018-03-01 23:37:15 -03:00
Carlos Alexandro Becker
2ff058fd64
fix: fixed init
For some reason when building . instead of main.go,
the main_packr.go file was being ignored it seems.

Also changed it to run with go generate.

refs #591
2018-03-01 22:05:59 -03:00
Carlos Alexandro Becker
7778a49499
feat: --skip-publish is back (#587)
* feat: --skip-publish is back

* style: using previously resolved flag

* test: docker test

* test: main coverage

* test: fixed brew tests
2018-03-01 01:12:58 -03:00
Carlos Alexandro Becker
76cfa61407
refactor: remove fpm in favor of nfpm (#567)
* refactor: remove fpm

* refactor: remove fpm

* refactor: .travis.yml

* chore: more cleanup

* chore: fix deploy
2018-02-26 18:49:58 -03:00
Carlos Alexandro Becker
289e21f70c
feat: improved init command (#577)
* feat: improved init command

* test: increased coverage

* revert: should have commited this yet
2018-02-25 18:49:34 -03:00
Carlos Alexandro Becker
dab527ed4f
chore: better help 2018-02-24 18:03:54 -03:00