2021-06-20 15:16:06 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-06-20 15:39:54 +02:00
|
|
|
"os"
|
2021-06-20 15:16:06 +02:00
|
|
|
"path"
|
|
|
|
|
2021-06-29 08:07:28 +02:00
|
|
|
"gitea-sonarqube-pr-bot/internal/settings"
|
2021-06-20 15:16:06 +02:00
|
|
|
)
|
|
|
|
|
2021-06-29 08:07:28 +02:00
|
|
|
func getConfigLocation() string {
|
2021-06-20 15:16:06 +02:00
|
|
|
configPath := path.Join("config")
|
2021-06-20 15:39:54 +02:00
|
|
|
if customConfigPath, ok := os.LookupEnv("PRBOT_CONFIG_PATH"); ok {
|
|
|
|
configPath = customConfigPath
|
|
|
|
}
|
|
|
|
|
|
|
|
return configPath
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2021-06-29 08:07:28 +02:00
|
|
|
settings.Load(getConfigLocation())
|
2021-06-20 15:16:06 +02:00
|
|
|
}
|