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

69 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
0d1e3c023f
fix: moving some logs to debug 2024-06-22 22:43:57 -03:00
Carlos Alexandro Becker
9b6af9efba
fix: actually respect changelog.abbrev (#4942)
Some changelogers were always returning the short sha instead of the
full one, so setting an abbrev had no effect.

This fixes these changelogers, which should now always return the full
sha.

Note that github usually still shortens the SHAs rendered in markdown,
so the changes might not even be visible in most cases.

closes #4829
2024-06-15 15:40:08 -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
Carlos Alexandro Becker
39bf6668bc
feat(changelog): custom commit format (#4802)
This allows to use templates for commit messages in the changelog when
using `github`, `gitea`, or `gitlab` as the changelog implementation.

closes #4800

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-24 09:08:20 -03:00
Carlos Alexandro Becker
ddb60f417e
refactor: improve switch 2024-04-23 09:11:49 -03:00
Carlos Alexandro Becker
bfb2217f02
test: fix gitea changeloger tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-23 09:08:54 -03:00
Carlos Alexandro Becker
673555519a
refactor: improve switch
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-23 09:08:46 -03:00
Carlos Alexandro Becker
7552d0b4e0
fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-22 23:44:28 -03:00
Bo-Yi Wu
c8488dc825
feat(gitea): implement Changelog function (#4794)
- Add `strings` package import to `gitea.go`
- Implement `Changelog` function in `gitea.go`
- Update `useGitea` constant in `changelog.go`
- Add test for `useGitea` in `changelog_test.go`
- Update `changelog.md` with information about `gitea` customization

ref:

* Server API: https://github.com/go-gitea/gitea/pull/30349
* SDK: https://gitea.com/gitea/go-sdk/pulls/659

---------

Signed-off-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-22 23:26:13 -03:00
Carlos Alexandro Becker
29f30b623e
feat: deprecated changelog.skip in favor of changelog.disable
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-01-14 15:57:44 -03:00
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
e5c9338efd
feat: changelog.include (#4122)
closes https://github.com/goreleaser/goreleaser/issues/4111
refs https://github.com/orgs/goreleaser/discussions/4110
recreated #4115

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-16 13:31:23 -03:00
Carlos Alexandro Becker
8b1c4ead60
feat: allow to PR homebrew taps (#3903)
closes #3485

also fixed a bug in file creation for github: it was always searching
for the file in the default branch

also, we don't need to create the file first, update does both create
and update.

TODO: implement the for krew, scoop, etc...

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-06 22:58:06 -03:00
Carlos Alexandro Becker
82144cb2c0
test: improve file not found checkings (#3831)
using `errors.Is` everywhere, as file not found errors have different
messages on different OSes.
2023-03-04 12:16:26 -03:00
Carlos Alexandro Becker
2920de7cec
feat: templateable changelog.skip (#3830)
closes #3828
2023-03-03 09:49:41 -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 A Becker
8e3567ed0a
refactor: rename ChangeLogGroup to ChangelogGroup
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-07 18:37:44 -03:00
Carlos A Becker
a1477f9370
refactor: improve changelog code
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-01-07 18:33:15 -03:00
Carlos A Becker
ad40cb0349
refactor: improve mergeability 2022-12-30 22:57:24 -03:00
Carlos Alexandro Becker
bd98343e4b
fix: improve changelog a bit (#3673)
revert a bit of the changes made in #3668 to improve mergeability with
pro.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-29 14:07:23 -03:00
Carlos Alexandro Becker
da2335791a
fix: native changeloger without previous tag (#3668)
closes #3662

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-29 10:41:59 -03:00
Steven Hartland
0ea4f1d5b7
fix(changelog): group regexps (#3527)
Fix the regular expressions used in changelog group processing to valid
golang (RE2) regexps. These previously used PCRE character class `\w`
which is not supported in RE2 which is what golang regexp uses.

Also document that format matches not just title as some may thing but
the format `<abbrev-commit> <title-commit>`.
2022-11-07 09:28:52 -03:00
Carlos Alexandro Becker
efdba10f58
fix: guard changelog commit abbrev behind config (#3349)
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>
2022-08-30 12:04:01 -03:00
Carlos A Becker
22da01914a
test: fix broken test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-10 00:14:51 -03:00
Carlos A Becker
102ac7e230
fix: changelog empty lines between sections 2022-08-08 00:20:10 -03:00
Carlos Alexandro Becker
b3fcc54a32
feat: changelog group improvements (#3203)
This changes the changelog grouping feature a bit: it evaluates the
groups in the order they are declared in the config file, but renders
them following their `order` attribute.

This allows to have better filters, for instance, you might want to have
dependabot commits in another section, which does not need a high
priority in the changelog output, but does when evaluating, as it might
share the words with other groups: in goreleaser's case, the `feat`
prefix.

Giving that Go's regex seems to don't allow negative look-aheads (which
would help in this particular case), this seems like a good quality of
life improvement.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-26 22:00:23 -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 Alexandro Becker
53b1ee07cf
feat: allow git remote urls from non-scm sources (#3088)
basically allows to use goreleaser against a repo with a git url without both owner and repo name.

closes #3060
closes #3058

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-05-09 09:32:43 -03:00
Carlos Alexandro Becker
ce9058ac8c
refactor: use context on git exec calls (#3032) 2022-04-12 08:35:19 -03:00
Carlos Alexandro Becker
5f30f3606a
fix: make --release-notes flags more deterministic (#2888)
* fix: make --release-notes flags more deterministic

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

* chore: fmt

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-02-06 22:09:46 -03:00
Carlos Alexandro Becker
456f8aa2b1
feat: warn if loaded changelog is whitespace-only (#2885)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-02-06 14:24:47 -03:00
Carlos Alexandro Becker
bdfb09cfb7
fix: do not filter and sort github-native changelog (#2803)
* fix: do not filter and sort github-native

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

* refactor: improve code a bit

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

* refactor: improve code a bit

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

* fix: changelog header

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-01-08 09:24:36 -03:00
Thomas Pelletier
8d5cee398b
fix: don't format github-native changelog (#2802)
The Github changelog generation API returns a pre-formatted changelog. The
current implementation prefixes every line of that log with "* ". This operation
breaks the formatting.

This change makes goreleaser treat github-native changelog as-is, without
trying to modify it.
2022-01-02 22:00:34 -03:00
Carlos Alexandro Becker
f42e0872f6
fix: do not group changelog when using github-native (#2781)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-12-21 14:21:05 -03:00
Carlos Alexandro Becker
cd261a527a
feat: allow to use .PreviousTag on templates (#2683)
* feat: expose .PreviousTag

* fix: previous tag will never be a commit

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

* fix: tests

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

* docs: tag

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-11-24 09:12:24 -03:00
Carlos Alexandro Becker
df0c31dea1
feat: make each changelog commit a list item (#2695)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-11-24 09:11:42 -03:00
Carlos A Becker
b508d7f156
test: add a case that cathes nothing
refs #2670

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-11-23 22:30:55 -03:00
Engin Diri
5ac11a1cba
feat: add changelog sorting (#2670)
Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
2021-11-23 22:23:53 -03:00
Carlos Alexandro Becker
8eae8b013a
feat: support github release notes (#2638)
* feat: support github release notes

* chore: godoc

* test: cover it with tests

* chore: fmt

* refactor: remove unused code
2021-11-07 12:53:28 -03:00
Carlos A Becker
cf73ede932
refactor: improve changelog code 2021-11-06 16:58:07 -03:00
Carlos A Becker
48d774970c
fix: add debug log for changelog file load
refs #2601
2021-10-26 23:05:25 -03:00
Drew Stinnett
03b6805715
feat: Adding gitlab api changelog (#2567)
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2021-10-10 10:52:46 -03:00
Carlos A Becker
1f774d5d6a
fix: changelog filters and sort when using github
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-06 01:15:31 -03:00
Carlos A Becker
ced5347388
refactor: improve scmChangeloger
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-04 23:35:28 -03:00
Carlos Alexandro Becker
89e5a4ebf1
feat: changelog from github (#2548)
* feat: changelog from github

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

* refactor: unifying client mocks

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

* refactor: unifying client mocks

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

* fix: mocks

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

* test: added tests

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

* fix: remove unused code

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

* test: added more

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

* fix: testdata

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

* fix: fmt

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

* test: fix

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

* test: fix

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

* docs: improve docs

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-04 09:32:30 -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
9913fe7db6
feat: template release notes (#2242)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-05-21 21:07:47 -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