ソースを参照

Absolute path for setting.CustomConf

tags/v1.2.0-rc1
Ethan Koenig 7年前
コミット
23d0735f90
1個のファイルの変更11行の追加5行の削除
  1. 11
    5
      integrations/integration_test.go

+ 11
- 5
integrations/integration_test.go ファイルの表示

} }


func initIntegrationTest() { func initIntegrationTest() {
if setting.CustomConf = os.Getenv("GITEA_CONF"); setting.CustomConf == "" {
fmt.Println("Environment variable $GITEA_CONF not set")
giteaRoot := os.Getenv("GITEA_ROOT")
if giteaRoot == "" {
fmt.Println("Environment variable $GITEA_ROOT not set")
os.Exit(1) os.Exit(1)
} }
if giteaRoot := os.Getenv("GITEA_ROOT"); giteaRoot == "" {
fmt.Println("Environment variable $GITEA_ROOT not set")
setting.AppPath = path.Join(giteaRoot, "gitea")

giteaConf := os.Getenv("GITEA_CONF")
if giteaConf == "" {
fmt.Println("Environment variable $GITEA_CONF not set")
os.Exit(1) os.Exit(1)
} else if !path.IsAbs(giteaConf) {
setting.CustomConf = path.Join(giteaRoot, giteaConf)
} else { } else {
setting.AppPath = path.Join(giteaRoot, "gitea")
setting.CustomConf = giteaConf
} }


setting.NewContext() setting.NewContext()

読み込み中…
キャンセル
保存