Move url to env file

This commit is contained in:
2024-08-15 22:38:16 +02:00
parent b77cf4bd05
commit 133498b139

View File

@@ -59,6 +59,11 @@ func main() {
Error.Fatalf("GITEA_PASSWORD environment variable is required")
os.Exit(1)
}
url, ok := envvar["GITEA_URL"]
if !ok {
Error.Fatalf("GITEA_URL environment variable is required")
os.Exit(1)
}
if username == "" || password == "" {
Error.Fatalf("GITEA_USER and GITEA_PASSWORD environment variables are required")
@@ -87,7 +92,7 @@ func main() {
os.Exit(1)
}
client, err := gitea.NewClient("https://git.site.quack-lab.dev/")
client, err := gitea.NewClient(url)
if err != nil {
Error.Fatalf("Error creating client: %v", err)
os.Exit(1)