update_all.ps1 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. param($Name = $null)
  2. cd $PSScriptRoot
  3. ls scripts\*.ps1 | % { . $_ }
  4. # used when running locally
  5. if (Test-Path update_vars.ps1) { . ./update_vars.ps1 }
  6. $options = @{
  7. Timeout = $env:au_timeout
  8. Push = $true
  9. Threads = $env:au_threads
  10. Force = $false
  11. Mail = if ($env:mail_user) {
  12. $enableSsl = $true
  13. if ($env:mail_enablessl -eq 'false') {
  14. $enableSsl = $false
  15. }
  16. @{
  17. To = $env:mail_user
  18. Server = $env:mail_server
  19. UserName = $env:mail_user
  20. Password = $env:mail_pass
  21. Port = $env:mail_port
  22. EnableSsl = $enableSsl
  23. }
  24. } else {}
  25. Gist_ID = $Env:Gist_ID
  26. Script = {
  27. param($Phase, $Info)
  28. if ($Phase -ne 'END') { return }
  29. Save-RunInfo
  30. Save-Gist
  31. Save-Git
  32. }
  33. }
  34. if ($env:au_push -eq 'false') {
  35. $options.Push = $false
  36. }
  37. if ($env:au_force -eq 'true') {
  38. $options.Force = $true
  39. }
  40. cd $PSScriptRoot/../automatic
  41. Update-AUPackages -Name $Name -Options $options | ft
  42. $global:updateall = Import-CliXML $PSScriptRoot\..\update_info.xml
  43. #Uncomment to fail the build on AppVeyor on any package error
  44. #if ($updateall.error_count.total) { throw 'Errors during update' }
  45. cd $PSScriptRoot