feat: add CLI tools auto-downloader and updater (#3559)

* feat: add CLI downloader feature

* feat: add CLI refresh endpoint and scheduler

* feat: improve binary names mapping for different platforms and architectures

* fix: format binary names in getBinaryNames function

* fix: change file permission notation to octal in cli_downloader.go

* feat: add isDemoMode check for CLI downloader features
This commit is contained in:
Coki
2025-02-07 19:22:56 +08:00
committed by GitHub
parent b7a818e2d3
commit 7f9f7c6468
4 changed files with 506 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import (
_ "github.com/beego/beego/session/redis"
"github.com/casdoor/casdoor/authz"
"github.com/casdoor/casdoor/conf"
"github.com/casdoor/casdoor/controllers"
"github.com/casdoor/casdoor/ldap"
"github.com/casdoor/casdoor/object"
"github.com/casdoor/casdoor/proxy"
@ -45,6 +46,7 @@ func main() {
object.InitCasvisorConfig()
util.SafeGoroutine(func() { object.RunSyncUsersJob() })
controllers.InitCLIDownloader()
// beego.DelStaticPath("/static")
// beego.SetStaticPath("/static", "web/build/static")