1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

76 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
efe8b7089e
refactor: remove an unneeded condition
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-13 09:11:21 -03:00
Carlos Alexandro Becker
297615b9b7
refactor: improve a bit the git changeloger
also explained things a bit more

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-13 09:09:26 -03:00
Carlos Alexandro Becker
ebe225a80b
fix(changelog): fix for no tags (#5272)
this should help when there is no tags in the repo yet

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-13 09:01:48 -03:00
Carlos Alexandro Becker
9a68c54d53
fix(changelog): first release default to git changelogger (#5242)
the `/compare` api doesn't allow to omit the previous reference, nor to
use a git commit, so, if `previous tag` is empty, we're now defaulting
to the git changelog implementation, which should resolve the problem.

closes #5240

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-04 14:13:30 -03:00
Oleksandr Redko
12155a336b
refactor: remove empty lines, fix //nolint (#5235)
The PR formats code by removing redundant empty lines and fixes
`//nolint` directives. Additionally, this PR adds two more rules to the
`revive` configuration: `empty-lines` and `comment-spacings`.

Removing unnecessary empty lines helps to keep the codebase clean and
concise. This issue is identified by the `revive.empty-lines` rule.

In the `//nolint` directive, there must be no spaces between `:` and the
linter name: `//nolint:gosec`. See ["Nolint
Directive"](https://golangci-lint.run/usage/false-positives/#nolint-directive).
This issue is identified by the `revive.comment-spacings` rule.

Note that it's not possible to add just a few additional rules to the
`revive.enable` list. We need to specify all: default rules plus
additional rules. See the detailed explanation
[here](https://github.com/prometheus/prometheus/pull/13068).
2024-10-31 13:51:54 -03:00
Eng Zer Jun
b2a02b582f
fix(changelog): fix random order of first commit in first release (#5173)
## Background

This is a bug that occurs randomly under a very specific condition.

Not sure how long this bug has been around. I first noticed it in the
failed Dagger test job in
https://github.com/goreleaser/goreleaser/pull/5161 after the `TestGroup`
unit test was updated to use regex matching
https://github.com/goreleaser/goreleaser/pull/5161#discussion_r1781302054.

Log:
https://github.com/goreleaser/goreleaser/actions/runs/11108665571/job/30862144417#step:4:680

```
--- FAIL: TestGroup (0.23s)
    changelog_test.go:843: 
        	Error Trace:	/src/internal/pipe/changelog/changelog_test.go:843
        	Error:      	Expect "## Changelog
        	            	### Features
        	            	* a77c0b89a457ee6a78447f6c9113b79cf4dce8ce feat: added that thing
        	            	### Bug Fixes
        	            	* 3e2908a87e5fdfdbd5efaad013c0b2d196c64c40 bug: Merge pull request #999 from goreleaser/some-branch
        	            	### Bots
        	            	* e2b7fbaaf1387cd4af575f5e329d9441ce1a917b feat(deps): update foobar [bot]
        	            	### Others
        	            	* 3643389d7150dc191eca4ac8428274fb31213a12 this is not a Merge pull request
        	            	* 3e1421263cd99fbd9a1a6c0196a355efe96e631d chore: something about cArs we dont need
        	            	* c094f150bc948d76f920219ef9729fd63747324b docs: whatever
        	            	* 242178ede64b3ff570dfbde6416f2c4718dd5b68 fix: whatever
        	            	* 02b7e77076dfed7475d42d728d69d13d19a10a39 ignored: whatever
        	            	* c3b78e347e5c38acc6b78e5a963b28221ac0cfee fixed bug 2
        	            	* fc5f56a9d915d19bc3630dc40aabd99a3eede02b added feature 1
        	            	* dc67ddaae25db36fe70d3b96311243621c176169 first
        	            	" to match "## Changelog
        	            	### Features
        	            	\* \w+ feat: added that thing
        	            	### Bug Fixes
        	            	\* \w+ bug: Merge pull request #999 from goreleaser\/some-branch
        	            	### Bots
        	            	\* \w+ feat\(deps\): update foobar \[bot\]
        	            	### Others
        	            	\* \w+ first
        	            	\* \w+ this is not a Merge pull request
        	            	\* \w+ chore: something about cArs we dont need
        	            	\* \w+ docs: whatever
        	            	\* \w+ fix: whatever
        	            	\* \w+ ignored: whatever
        	            	\* \w+ fixed bug 2
        	            	\* \w+ added feature 1
        	            	"
        	Test:       	TestGroup
```


Then it also failed in:

1. 71e7a63ca111d184ac9ab3f68187b12c63b2c13e

Log:
https://github.com/goreleaser/goreleaser/actions/runs/11166871425/job/31041794426#step:4:667

```
--- FAIL: TestGroup (0.13s)
    changelog_test.go:843: 
        	Error Trace:	/src/internal/pipe/changelog/changelog_test.go:843
        	Error:      	Expect "## Changelog
        	            	### Features
        	            	* 7a9c58e3f299b347754c02a149f77d4450768aba feat: added that thing
        	            	### Bug Fixes
        	            	* 9d5982da0fa36817c9c907271ece0a238bc24918 bug: Merge pull request #999 from goreleaser/some-branch
        	            	### Bots
        	            	* 6890859be3907f8f1b60b1a82cb4af277a0bc425 feat(deps): update foobar [bot]
        	            	### Others
        	            	* 6acc3600c5fe17d0330b566e6d5703e48725f300 this is not a Merge pull request
        	            	* 31abf613e4c3a5fcaebb0a1a23bcd418d61d2c4d first
        	            	* 14a53e66c59c532a81e729b6717aa4137cc292fb chore: something about cArs we dont need
        	            	* df77c2f0d8b1bbdc697e843e1dd2764a716a2aa5 docs: whatever
        	            	* a4802f6fc858cbc12ceca360a89894a61a0a097f fix: whatever
        	            	* 7a2645a1262516ca24443a65c137680e2e3857fc ignored: whatever
        	            	* b66e319579a7eeb319d1d2a95cb938d6316d3edb fixed bug 2
        	            	* 377012fb77758238b46a20c8bbd348e55d011168 added feature 1
        	            	" to match "## Changelog
        	            	### Features
        	            	\* \w+ feat: added that thing
        	            	### Bug Fixes
        	            	\* \w+ bug: Merge pull request #999 from goreleaser\/some-branch
        	            	### Bots
        	            	\* \w+ feat\(deps\): update foobar \[bot\]
        	            	### Others
        	            	\* \w+ first
        	            	\* \w+ this is not a Merge pull request
        	            	\* \w+ chore: something about cArs we dont need
        	            	\* \w+ docs: whatever
        	            	\* \w+ fix: whatever
        	            	\* \w+ ignored: whatever
        	            	\* \w+ fixed bug 2
        	            	\* \w+ added feature 1
        	            	"
        	Test:       	TestGroup
```

2. 747c11d83301405c40df3a5b56adf976c8382b0f

Log:
https://github.com/goreleaser/goreleaser/actions/runs/11166873534/job/31041800714#step:4:677

```
--- FAIL: TestGroup (0.09s)
    changelog_test.go:843: 
        	Error Trace:	/src/internal/pipe/changelog/changelog_test.go:843
        	Error:      	Expect "## Changelog
        	            	### Features
        	            	* 49f56e2d8ca352d4641828efd167dbfe91f5769a feat: added that thing
        	            	### Bug Fixes
        	            	* 11c8dafa67d5973c359ed3bcf859b81d571396ed bug: Merge pull request #999 from goreleaser/some-branch
        	            	### Bots
        	            	* df888fe601a92afe5d8d4fcae5a551b0eaa57684 feat(deps): update foobar [bot]
        	            	### Others
        	            	* 03f397c28cd4f5484afee71f7edd99977f85deec this is not a Merge pull request
        	            	* 16333c2d178e4911a049ba63b0b8783bbc7e497b chore: something about cArs we dont need
        	            	* e7b30e58579bdaaeea184d78ddb5017a2bdc3459 docs: whatever
        	            	* ab9abbc7aa88208f2b3dc44dc9f7b0e55771b826 fix: whatever
        	            	* 87fc355911ca94f0a1e5a6c332e36b1f73654fbe ignored: whatever
        	            	* 189fa3fb4ceb246084404247ad1b521747f30991 fixed bug 2
        	            	* 49fdca4fd96ec600d79722f3453c1b84e82dd6e5 added feature 1
        	            	* ea1e16eb97b432d9c111df934ea4b6ce3691438a first
        	            	" to match "## Changelog
        	            	### Features
        	            	\* \w+ feat: added that thing
        	            	### Bug Fixes
        	            	\* \w+ bug: Merge pull request #999 from goreleaser\/some-branch
        	            	### Bots
        	            	\* \w+ feat\(deps\): update foobar \[bot\]
        	            	### Others
        	            	\* \w+ first
        	            	\* \w+ this is not a Merge pull request
        	            	\* \w+ chore: something about cArs we dont need
        	            	\* \w+ docs: whatever
        	            	\* \w+ fix: whatever
        	            	\* \w+ ignored: whatever
        	            	\* \w+ fixed bug 2
        	            	\* \w+ added feature 1
        	            	"
        	Test:       	TestGroup
```

3. 10980311a53bf90e3d5d469a9c3e916d67c0050d

Log:
https://github.com/goreleaser/goreleaser/actions/runs/11183904433/job/31093519567#step:14:41

```
--- FAIL: TestGroup (0.14s)
    changelog_test.go:843: 
        	Error Trace:	/home/runner/work/goreleaser/goreleaser/internal/pipe/changelog/changelog_test.go:843
        	Error:      	Expect "## Changelog
        	            	### Features
        	            	* ec216fc3537667e300da4181c6b51520367afd28 feat: added that thing
        	            	### Bug Fixes
        	            	* 5132e678d5f69a366415474cefce012c640a7de9 bug: Merge pull request #999 from goreleaser/some-branch
        	            	### Bots
        	            	* dd9571e27c5a4f19882b8062a790636376b677bc feat(deps): update foobar [bot]
        	            	### Others
        	            	* c9b95e3b52ad6a82bacabae63decd45b1038d137 this is not a Merge pull request
        	            	* 260f70d5c2b6e31a35058b727818a78a7d589a22 chore: something about cArs we dont need
        	            	* 0969cba5b1363473e05eb251ffefbccd46fa6fc8 first
        	            	* c504cb0173a1f312ab39d17852f86b95504ff767 docs: whatever
        	            	* d57cab9360470d0e0a03d1ecb4763e89fe182f8f fix: whatever
        	            	* 2e659ceef3f2231ed107c80954833d9073091dd3 ignored: whatever
        	            	* 72658b11fd2789a03e83496d723a9196f7b14467 fixed bug 2
        	            	* 883d4fab813e6849520463b5325077a9ef45131d added feature 1
        	            	" to match "## Changelog
        	            	### Features
        	            	\* \w+ feat: added that thing
        	            	### Bug Fixes
        	            	\* \w+ bug: Merge pull request #999 from goreleaser\/some-branch
        	            	### Bots
        	            	\* \w+ feat\(deps\): update foobar \[bot\]
        	            	### Others
        	            	\* \w+ first
        	            	\* \w+ this is not a Merge pull request
        	            	\* \w+ chore: something about cArs we dont need
        	            	\* \w+ docs: whatever
        	            	\* \w+ fix: whatever
        	            	\* \w+ ignored: whatever
        	            	\* \w+ fixed bug 2
        	            	\* \w+ added feature 1
        	            	"
        	Test:       	TestGroup
```


As we can see from the log, the first commit with the `first` message
can appear in a random order in the changelog.

---

## Solution

In the `TestGroup` unit test, we are making 11 git commits, all within a
second. There seems to be a bug with `git log` where it is unable to
order the commits in reverse chronological order if all commits have the
same authored and committed date, as shown below.

> [!note]
> `/tmp/TestGroup4125952855/001` is the temporary directory created by
`testlib.Mktmp` in `TestGroup` test.

`git log` without revision range:

```
/tmp/TestGroup4125952855/001 main ❯ git log --oneline
85f005f (HEAD -> main, tag: v0.0.2) this is not a Merge pull request
27dbd0e bug: Merge pull request #999 from goreleaser/some-branch
3495034 feat: added that thing
9f0db77 chore: something about cArs we dont need
634e043 docs: whatever
ef52fef fix: whatever
ff49bea feat(deps): update foobar [bot]
e0f4e4b ignored: whatever
ce7fbfa fixed bug 2
940a684 added feature 1
2750980 (tag: v0.0.1) first
```

`git log` with multiple revision ranges, the "first" commit appears at
the top:

```
/tmp/TestGroup4125952855/001 main ❯ git log --oneline 2750980 v0.0.2
2750980 (tag: v0.0.1) first
85f005f (HEAD -> main, tag: v0.0.2) this is not a Merge pull request
27dbd0e bug: Merge pull request #999 from goreleaser/some-branch
3495034 feat: added that thing
9f0db77 chore: something about cArs we dont need
634e043 docs: whatever
ef52fef fix: whatever
ff49bea feat(deps): update foobar [bot]
e0f4e4b ignored: whatever
ce7fbfa fixed bug 2
940a684 added feature 1
```

If we specify only one revision, then the commits are ordered correctly
in reverse chronological order:

```
/tmp/TestGroup4125952855/001 main ❯ git log --oneline v0.0.2
85f005f (HEAD -> main, tag: v0.0.2) this is not a Merge pull request
27dbd0e bug: Merge pull request #999 from goreleaser/some-branch
3495034 feat: added that thing
9f0db77 chore: something about cArs we dont need
634e043 docs: whatever
ef52fef fix: whatever
ff49bea feat(deps): update foobar [bot]
e0f4e4b ignored: whatever
ce7fbfa fixed bug 2
940a684 added feature 1
2750980 (tag: v0.0.1) first
```

Based on my observations, this bug can only happen when all commits are
created at the same time, and the user is creating their first release
note.

This commit fixes the bug by excluding the first commit SHA-1 hash from
`git log` in `gitChangeLogger`.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-10-07 21:45:32 -03:00
Eng Zer Jun
b8aef100f2
perf(changelog): improve changelog sort performance (#5161)
This commit removes the unnecessary slice copy in `sortEntries`, and
replaces `sort.Slice` [^1] with the new `slices.SortFunc` [^2].

As recommended by the Go documentation, `slices.SortFunc` is generally
faster because it uses generic, whereas `sort.Slice` relies on
reflection, which incurs additional allocations

The benchmark result from the newly added `Benchmark_sortEntries` show
approximately a 64% performance improvement.


Benchmark result:

```
                     │   old.txt    │               new.txt               │
                     │    sec/op    │   sec/op     vs base                │
_sortEntries/asc-16    16.458µ ± 1%   5.958µ ± 1%  -63.80% (p=0.000 n=10)
_sortEntries/desc-16   17.675µ ± 1%   6.020µ ± 0%  -65.94% (p=0.000 n=10)
geomean                 17.06µ        5.989µ       -64.89%

                     │   old.txt    │               new.txt                │
                     │     B/op     │     B/op      vs base                │
_sortEntries/asc-16    3.164Ki ± 0%   1.164Ki ± 0%  -63.21% (p=0.000 n=10)
_sortEntries/desc-16   3.422Ki ± 0%   1.164Ki ± 0%  -65.98% (p=0.000 n=10)
geomean                3.290Ki        1.164Ki       -64.62%

                     │  old.txt   │              new.txt               │
                     │ allocs/op  │ allocs/op   vs base                │
_sortEntries/asc-16    68.00 ± 0%   25.00 ± 0%  -63.24% (p=0.000 n=10)
_sortEntries/desc-16   72.00 ± 0%   25.00 ± 0%  -65.28% (p=0.000 n=10)
geomean                69.97        25.00       -64.27%
```

[^1]: https://pkg.go.dev/sort#Slice
[^2]: https://pkg.go.dev/slices#SortFunc

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-09-30 13:27:29 -03:00
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