Save-Git.ps1 415 B

12345678910111213141516
  1. function Save-Git() {
  2. $pushed = $Info.result.pushed
  3. if (!$Info.pushed) { "Git: no package is pushed to chocolatey, skipping"; return }
  4. ""
  5. "Executing git pull"
  6. git checkout master
  7. git pull
  8. "Commiting updated packages to git repository"
  9. $pushed | % { git add $_.PackageName }
  10. git commit -m "UPDATE BOT: $($Info.pushed) packages updated"
  11. "Pushing git changes"
  12. git push
  13. }