Don't give updateSite() a clone url

This commit is contained in:
Noah 2024-03-11 15:52:49 -05:00
parent 541fb1ca99
commit fef65ea991
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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 {