au_setup.ps1 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. @"
  2. ## Update Variables - AU
  3. #
  4. # This file is not checked in. It exists only locally.
  5. # These same settings should be verified with appveyor.yml
  6. # Job parameters
  7. `$env:au_timeout = '100'
  8. `$env:au_threads = '10'
  9. `$env:au_push = 'true'
  10. `$env:au_force = 'false'
  11. # Github credentials - used to save result to gist and to commit pushed packages to the git repository
  12. `$env:github_user = 'YOUR_USER_NAME_HERE'
  13. `$env:github_pass = 'YOUR_PASSWORD_OR_2FA_AUTH_TOKEN_HERE'
  14. `$env:github_user_repo= 'username/repository' #https://github.com/chocolatey/chocolatey-packages-template is 'chocolatey/chocolatey-packages-template'
  15. # Email credentials - for error notifications
  16. `$env:mail_user = 'YOUR_EMAIL_ACCOUNT'
  17. `$env:mail_pass = 'YOUR_EMAIL_PASSWORD_HERE'
  18. `$env:mail_server = 'smtp.gmail.com'
  19. `$env:mail_port = '587'
  20. `$env:mail_enablessl = 'true'
  21. # Chocolatey API key - to push updated packages
  22. `$env:api_key = 'YOUR_CHOCO_API_KEY_HERE'
  23. # ID of the gist used to save run results - create a gist under the github_user (secret or not) and grab the id - https://gist.github.com/name/id
  24. `$env:gist_id = 'YOUR_GIST_ID_CREATE_GIST_SAVE_ID_HERE'
  25. "@ | Out-File $PSScriptRoot\..\au\update_vars.ps1 -NoClobber
  26. #
  27. # Uncomment these next lines if you are using AU
  28. # and have WMF3+ installed.
  29. # Otherwise you need to find a way to install PowerShell PackageManagement
  30. # WMF 3/4 only
  31. if ($PSVersionTable.PSVersion -lt $(New-Object System.Version("5.0.0.0"))) {
  32. choco install dotnet4.5.1 -y
  33. choco upgrade powershell-packagemanagement --ignore-dependencies -y
  34. }
  35. choco install ruby -y
  36. refreshenv # You need the Chocolatey profile installed for this to work properly (Choco v0.9.10.0+).
  37. gem install gist --no-ri --no-rdoc
  38. Install-PackageProvider -Name NuGet -Force
  39. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
  40. Install-Module au -Scope AllUsers
  41. #Get-Module au -ListAvailable | select Name, Version