From fef65ea991adef6fecef26b5693e3ab1ae6ce24a Mon Sep 17 00:00:00 2001 From: Noah Date: Mon, 11 Mar 2024 15:52:49 -0500 Subject: [PATCH] Don't give updateSite() a clone url --- main.go | 2 +- site.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 392a478..66ef4f7 100644 --- a/main.go +++ b/main.go @@ -34,7 +34,7 @@ func handler(data map[string]interface{}) { newDeployError(1, "handler", "Failed to check if site '%s' exists", fmt.Sprint(err)) } if exists { - if deploy_error := updateSite(repository["ssh_url"].(string), repo_name); deploy_error.code != 0 { + if deploy_error := updateSite(repo_name); deploy_error.code != 0 { deploy_error.SendOverMatrix(); return } if deploy_error := restartSite(repo_name); deploy_error.code != 0 { diff --git a/site.go b/site.go index 29ade41..5d7d042 100644 --- a/site.go +++ b/site.go @@ -83,7 +83,7 @@ func restartSite(name string) DeployError { } // updateSite attempts to pull or clone a repository using the given name and url -func updateSite(url string, name string) DeployError { +func updateSite(name string) DeployError { log.Printf("Pulling down repository %s...", name) repo,err := git.Open(configuration.sites_dir+"/"+name) if err != nil {