You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
543 B

package padArchiver
import (
"fmt"
"os/exec"
)
//GitUpdate updates the git
func (repo *Repo) GitUpdate(commitMsg string) error {
//TODO this is not finished
_, err := exec.Command("bash", "-c", "git pull origin master").Output()
if err != nil {
fmt.Println(err)
return err
}
_, err = exec.Command("bash", "-c", "git add .").Output()
if err != nil {
fmt.Println(err)
return err
}
_, err = exec.Command("bash", "-c", "git commit -m '"+commitMsg+"'").Output()
if err != nil {
fmt.Println(err)
return err
}
return nil
}