Don't give updateSite() a clone url
This commit is contained in:
parent
541fb1ca99
commit
fef65ea991
2
main.go
2
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 {
|
||||
|
2
site.go
2
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user