update_all.ps1 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # AU template: https://raw.githubusercontent.com/majkinetor/au/master/update_all_default.ps1
  2. # env vars: https://raw.githubusercontent.com/majkinetor/au/master/update_vars_default.ps1
  3. param($Name = $null)
  4. if (Test-Path $PSScriptRoot/update_vars.ps1) { . $PSScriptRoot/update_vars.ps1 }
  5. $Options = [ordered]@{
  6. Timeout = 100 #Connection timeout in seconds
  7. Threads = 10 #Number of background jobs to use
  8. Push = $Env:au_Push -eq 'true' #Push to chocolatey
  9. PluginPath = '' #Path to user plugins
  10. Report = @{
  11. Type = 'markdown' #Report type: markdown or text
  12. Path = "$PSScriptRoot\Update-AUPacakges.md" #Path where to save the report
  13. Params= @{ #Report parameters:
  14. Github_UserRepo = $Env:github_UserRepo # Markdown: shows user info in upper right corner
  15. UserMessage = '' # Markdown, Text: Custom user message to show
  16. }
  17. }
  18. Gist = @{
  19. Id = '' #Your gist id or leave empty for anonymous
  20. ApiKey = '' #Your github api key
  21. Path = "$PSScriptRoot\Update-AUPacakges.md" #List of files to add to gist
  22. }
  23. #Git = @{
  24. #User = '' #Git username, leave empty if github api key is used
  25. #Password = $Env:github_api_key #Password if username is not empty, otherwise api key
  26. #}
  27. RunInfo = @{
  28. Exclude = 'password', 'apikey' #Option keys which contain those words will be removed
  29. Path = "$PSScriptRoot\update_info.xml" #Path where to save run info
  30. }
  31. Mail = if ($Env:mail_user) {
  32. @{
  33. To = $Env:mail_user
  34. Server = 'smtp.gmail.com'
  35. UserName = $Env:mail_user
  36. Password = $Env:mail_pass
  37. Port = 587
  38. EnableSsl = $true
  39. Attachments = "$PSScriptRoot\update_info.xml"
  40. UserMessage = ''
  41. SendAlways = $false #Send notifications every time
  42. }
  43. } else {}
  44. }
  45. $global:au_NoPlugins = $false #Quickly enable or disable plugins here
  46. $global:au_Root = "$PSScriptRoot\..\automatic" #Path to the AU packages
  47. $info = updateall -Name $Name -Options $Options
  48. #Uncomment to fail the build on AppVeyor on any package error
  49. #if ($info.error_count.total) { throw 'Errors during update' }