1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00

8 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
3cfefcc4ce
fix: decouple project_name guessing from the release pipe (#4335)
the release's defaults run before the project's does, so, usually the
github/gitlab/gitea names are set.

however, in some cases, the release's defaults might be skipped, in
which case they'll be empty.

this breaks things like `goreleaser changelog`, especially on non-go
repositories.

this pr tries to extract the project name from the git remote url in the
project's defaulter.

it might be possible now to move it to run before the release defaulter,
even.

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-10-14 18:59:07 -03:00
Carlos Alexandro Becker
b6dd26c091
feat: infer package name from go.mod (#3827)
If all other strategies fail, try to infer the `package_name` property
from the `go.mod` file, using its last segment as the actual package
name.

This is not perfect, but usually this will only be used when running
against a new project, with no git url, empty/default config, etc... so,
in reality, it'll rarely be used.

closes #3825

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-03 09:50:02 -03:00
Carlos Alexandro Becker
f544c5ce69
test: testctx pkg (#3807)
alternative to #3806 

the idea is that both `context.New` and `context.Context{}` are never
used in tests.

not sure yet how much I like it, so far code does look a bit more
readable though.

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-02 00:01:11 -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
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
Carlos Alexandro Becker
5efb690d1c
fix: fail if cant guess project name (#1378)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-03-04 16:03:05 -03:00
Craig Furman
61fb8f50cc
fix: infer project name from GitLab/Gitea release (#1364) 2020-02-26 09:38:07 -03:00
Carlos Alexandro Becker
39de856eb4
refactor: better package organization 2018-09-12 14:18:01 -03:00