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.

26 lines
514 B

  1. package padArchiver
  2. import (
  3. "fmt"
  4. "os/exec"
  5. )
  6. //TODO this is not finished
  7. func (repo *Repo) GitUpdate(commitMsg string) error {
  8. _, err := exec.Command("bash", "-c", "git pull origin master").Output()
  9. if err != nil {
  10. fmt.Println(err)
  11. return err
  12. }
  13. _, err = exec.Command("bash", "-c", "git add .").Output()
  14. if err != nil {
  15. fmt.Println(err)
  16. return err
  17. }
  18. _, err = exec.Command("bash", "-c", "git commit -m '"+commitMsg+"'").Output()
  19. if err != nil {
  20. fmt.Println(err)
  21. return err
  22. }
  23. return nil
  24. }