WIP: Generate Changelog automagically#1298
Conversation
|
@strk Since I moved your changelog to a file, do you want your full name in there or nickname? (or both) |
tboerger
left a comment
There was a problem hiding this comment.
Maybe generally use log instead of fmt?
| ) | ||
|
|
||
| var ( | ||
| version = flag.String("version", "", "Version for changelog") |
There was a problem hiding this comment.
The definition into main to avoid conflicts?
| ) | ||
|
|
||
| func init() { | ||
| flag.Parse() |
There was a problem hiding this comment.
Within the other scripts I have moved that into main as well
| os.Exit(1) | ||
| } | ||
| if err := cl.Write(*outputFile); err != nil { | ||
| fmt.Printf("Error: writing changelog: %v\n", err) |
| prUrlFormat = "https://github.com/go-gitea/gitea/pull/%d" | ||
| tagUrlFormat = "https://github.com/go-gitea/gitea/releases/tags/v%s" | ||
|
|
||
| cleTmpl = ` |
| @@ -0,0 +1,162 @@ | |||
| # Changelog | |||
|
|
|||
| ## Unreleased | |||
There was a problem hiding this comment.
Shouldn't be part of the historical file
|
|
||
| .PHONY: CHANGELOG.md | ||
| CHANGELOG.md: changelog/unreleased/*.md changelog/HISTORICAL.md | ||
| cat changelog/HISTORICAL.md >> CHANGELOG.md |
There was a problem hiding this comment.
This sounds brutal. A Makefile target that always unconditionally appends to a file ?
I see that file is created by the unreleased/*.md target, but it isn't at all intutitive.
There was a problem hiding this comment.
I've updated it so it hopefully makes more sense :)
|
ChangeLog codes maybe should be in |
|
@lunny I thought |
|
@lunny Maybe even it's own repo? |
|
@bkcsoft I just give an advice to reuse the functions. But I cannot give you some ideas about how to do that. |
|
@tboerger I've updated according to your request :) |
|
@lunny @tboerger I made it into it's own repo. You can find it here: https://gitlab.com/bkc/changelogger |
|
@bkcsoft great! |
|
build failed. |
|
I'm closing this in favour of the actual package. |
What it does:
Automagically generate changelog on
make release🎉TODO:
changelog/HISTORICAL.mdFormat: (stolen from #505)
Current implementation is extremely write-intensive... That should be fixed 🙄
Please be brutal when reviewing this, since it needs to work 100% flawless
I assigned all Owners to review, since we deal with this pain. Also assigned Team maintainers since I want more eyes on this code 😆
Closes #505