-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(changelog): overwrite file if configured, pass max file size in MB #67
Conversation
f33b46c
to
628aa27
Compare
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, when we append to the file, should we also add a file size limit? When the file gets to big, we start a new one and keep the old file under different name?
Yes, good idea! What would be a good file limit? Or we could limit it by the count of existing release changelogs in a file. A separator for this kind of solution could be the markdown line When a file limit / or max count of releases exceed, I would copy the current file to -[0-9].md |
Maybe we can start with 10 MB? Else we can make it changeable via the config file. |
@fwiedmann are you still working on it? |
Yes still WIP. I can work on this again next weekend ;) |
remove version 1.13, 1.14
…write to overwrite the whole file BREAKING CHANGE: changelog command will now prepend changelogs to the changelog-file
…e log file if exceeded.feat/changelog still in WIO
@Nightapes The basics are done. Could you review the current changes? What is still missing:
|
@@ -8,7 +8,9 @@ import ( | |||
|
|||
func init() { | |||
changelogCmd.Flags().Bool("checks", false, "Check for missing values and envs") | |||
changelogCmd.Flags().Bool("overwrite", false, "Overwrite the content of the changelog. Default is to prepend the new changelog to the existing file.") |
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.
Should we add the flags to the release commands and write the changelog there too?
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 would only improve the workflow if the users running the release command on their local machine right?
So If yes, I think they can run two commands :D
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.
True, but there are custom setups. But this can be done in a extra PR
For #55.
--max-file-size
check if an existing file exceeds the limit. If yes the current file will be moved tofilename-<1-n>.file-extension
. The new changelog will be written to--overwrite
will overwrite the current changelog file with the new generated changelog.