Introduce "config edit-ini" sub command to help maintaining INI config file#35735
Introduce "config edit-ini" sub command to help maintaining INI config file#35735wxiaoguang merged 9 commits intogo-gitea:mainfrom
Conversation
13185e6 to
63a5301
Compare
|
Maybe this is a good opportunity to restrict environment-based configuration to only specific sections. |
TheFox0x7
left a comment
There was a problem hiding this comment.
Approving as the only concern I have are flag name and semi-clear instructions, the latter of which can easily be reworded if someone will have questions about the behavior.
I don't have much better ideas for the flag name though the template part still feels wrong here but naming things always was hard :)
761c0e8 to
6802be3
Compare
|
Applied your suggestions and made new changes:
|
|
Will the |
Yes |
* giteaofficial/main: [skip ci] Updated translations via Crowdin Revert go-gitea#18491, fix oauth2 client link account (go-gitea#35745) Upgrade go mail to 0.7.2 (go-gitea#35748) [skip ci] Updated translations via Crowdin Support actions and reusable workflows from private repos (go-gitea#32562) Use git model to detect whether branch exist instead of gitrepo method (go-gitea#35459) Fix shutdown waitgroup panic (go-gitea#35676) Intorduce "config edit-ini" sub command to help maintaining INI config file (go-gitea#35735) Improve online runner check (go-gitea#35722) Make "update file" API can create a new file when SHA is not set (go-gitea#35738) Fix review request webhook bug (go-gitea#35339) (go-gitea#35723) Misc tool tweaks (go-gitea#35734) Update dependencies (go-gitea#35733) Make external iframe render work (go-gitea#35730) Remove mermaid margin workaround (go-gitea#35732) # Conflicts: # models/user/user.go
Ref: #32669. Helps addressing https://gitea.com/gitea/helm-chart/issues/356.
If you need to re-create the configuration file with only a subset of keys,
you can provide an INI template file and use the "--config-keep-keys" flag.
For example, if a helm chart needs to reset the settings and only keep SECRET_KEY,
it can use a template file like:
$ ./gitea config edit-ini --config app-old.ini --config-keep-keys app-template.ini --out app-new.ini