au_setup.ps1 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. # Github credentials - used to save result to gist and to commit pushed packages to the git repository
  10. `$env:github_user = 'YOUR_USER_NAME_HERE'
  11. `$env:github_pass = 'YOUR_PASSWORD_OR_2FA_AUTH_TOKEN_HERE'
  12. `$env:github_user_repo= 'username/repository' #https://github.com/chocolatey/chocolatey-packages-template is 'chocolatey/chocolatey-packages-template'
  13. # Email credentials - for error notifications
  14. `$env:mail_user = 'YOUR_EMAIL_ACCOUNT'
  15. `$env:mail_pass = 'YOUR_EMAIL_PASSWORD_HERE'
  16. `$env:mail_server = 'smtp.gmail.com'
  17. `$env:mail_port = '587'
  18. `$env:mail_enablessl = 'true'
  19. # Chocolatey API key - to push updated packages
  20. `$env:api_key = 'YOUR_CHOCO_API_KEY_HERE'
  21. # ID of the gist used to save run results
  22. `$env:gist_id = 'YOUR_GIST_ID_CREATE_GIST_SAVE_ID_HERE'
  23. "@ | Out-File $PSScriptRoot\..\au\update_vars.ps1 -NoClobber
  24. #
  25. # Uncomment these next lines if you are using AU
  26. # and have WMF3+ installed.
  27. # Otherwise you need to find a way to install PowerShell PackageManagement
  28. # WMF 3/4 only
  29. if ($PSVersionTable.PSVersion -lt $(New-Object System.Version("5.0.0.0"))) {
  30. choco install dotnet4.5.1 -y
  31. choco upgrade powershell-packagemanagement --ignore-dependencies -y
  32. }
  33. choco install ruby -y
  34. refreshenv # You need the Chocolatey profile installed for this to work properly (Choco v0.9.10.0+).
  35. gem install gist --no-ri --no-rdoc
  36. Install-PackageProvider -Name NuGet -Force
  37. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
  38. Install-Module au -Scope AllUsers
  39. #Get-Module au -ListAvailable | select Name, Version