-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe generally use log instead of fmt?
scripts/generate-changelog.go
Outdated
) | ||
|
||
var ( | ||
version = flag.String("version", "", "Version for changelog") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definition into main to avoid conflicts?
scripts/generate-changelog.go
Outdated
) | ||
|
||
func init() { | ||
flag.Parse() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within the other scripts I have moved that into main as well
scripts/generate-changelog.go
Outdated
os.Exit(1) | ||
} | ||
if err := cl.Write(*outputFile); err != nil { | ||
fmt.Printf("Error: writing changelog: %v\n", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exit?
scripts/generate-changelog.go
Outdated
prUrlFormat = "https://github.com/go-gitea/gitea/pull/%d" | ||
tagUrlFormat = "https://github.com/go-gitea/gitea/releases/tags/v%s" | ||
|
||
cleTmpl = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete or unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused
changelog/HISTORICAL.md
Outdated
@@ -0,0 +1,162 @@ | |||
# Changelog | |||
|
|||
## Unreleased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be part of the historical file
Makefile
Outdated
|
||
.PHONY: CHANGELOG.md | ||
CHANGELOG.md: changelog/unreleased/*.md changelog/HISTORICAL.md | ||
cat changelog/HISTORICAL.md >> CHANGELOG.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.md
Format: (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