mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-05-04 01:47:51 +00:00
rename gitea to forge for cli and add gitea options as aliases
This commit is contained in:
parent
9ce901bfa0
commit
5cac5e105c
6 changed files with 73 additions and 44 deletions
config
|
@ -51,7 +51,7 @@ func MergeConfig(ctx *cli.Context, config *Config) {
|
|||
}
|
||||
|
||||
mergeServerConfig(ctx, &config.Server)
|
||||
mergeGiteaConfig(ctx, &config.Gitea)
|
||||
mergeForgeConfig(ctx, &config.Forge)
|
||||
mergeDatabaseConfig(ctx, &config.Database)
|
||||
mergeACMEConfig(ctx, &config.ACME)
|
||||
}
|
||||
|
@ -89,12 +89,12 @@ func mergeServerConfig(ctx *cli.Context, config *ServerConfig) {
|
|||
config.BlacklistedPaths = append(config.BlacklistedPaths, ALWAYS_BLACKLISTED_PATHS...)
|
||||
}
|
||||
|
||||
func mergeGiteaConfig(ctx *cli.Context, config *GiteaConfig) {
|
||||
if ctx.IsSet("gitea-root") {
|
||||
config.Root = ctx.String("gitea-root")
|
||||
func mergeForgeConfig(ctx *cli.Context, config *ForgeConfig) {
|
||||
if ctx.IsSet("forge-root") {
|
||||
config.Root = ctx.String("forge-root")
|
||||
}
|
||||
if ctx.IsSet("gitea-api-token") {
|
||||
config.Token = ctx.String("gitea-api-token")
|
||||
if ctx.IsSet("forge-api-token") {
|
||||
config.Token = ctx.String("forge-api-token")
|
||||
}
|
||||
if ctx.IsSet("enable-lfs-support") {
|
||||
config.LFSEnabled = ctx.Bool("enable-lfs-support")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue