Browse Source

Split au setup from ketarin setup

Rob Reynolds 7 years ago
parent
commit
3e4d2e3211
3 changed files with 32 additions and 20 deletions
  1. 5 2
      setup/README.md
  2. 16 18
      setup/au_setup.ps1
  3. 11 0
      setup/ketarin_setup.ps1

+ 5 - 2
setup/README.md

@@ -2,12 +2,15 @@
 
 ### Ketarin/ChocolateyPackageUpdater Automatic Packaging
 
-* Review `setup.ps1` to ensure all items are set appropriately. Uncomment/change anything you need to now.
-* Run `setup.ps1`
+* Review `ketarin_setup.ps1` to ensure all items are set appropriately. Uncomment/change anything you need to now.
+* Run `ketarin_setup.ps1`
 * Open ketarin after installing it, open the settings and import `KetarinSettings.xml`.
 
 ### Automatic Updater (AU)
 
+* Review `au_setup.ps1` to ensure all items are set appropriately. Uncomment/change anything you need to now.
+* Run `au_setup.ps1`
+
 #### Set up AppVeyor for packaging
 * Go to AppVeyor and sign up/sign in. https://ci.appveyor.com/
 * Set up an appveyor job - https://ci.appveyor.com/projects/new

+ 16 - 18
setup/setup.ps1 → setup/au_setup.ps1

@@ -1,18 +1,13 @@
-# If you change this value, also change it in the global settings
-# The name will also be saveDir
-$saveDir = "c:\chocolatey-auto-save"
-
-Write-Host "Ensuring that the Ketarin auto save folder is set appropriately."
-if (!(Test-Path($saveDir))) {
-  mkdir $saveDir
-}
-
 @"
 ## Update Variables - AU
 #
 # This file is not checked in. It exists only locally.
 # These same settings should be verified with appveyor.yml
 
+# Job parameters
+`$env:au_timeout      = '100'
+`$env:au_threads      = '10'
+
 # Github credentials - used to save result to gist and to commit pushed packages to the git repository
 `$env:github_user     = 'YOUR_USER_NAME_HERE'
 `$env:github_pass     = 'YOUR_PASSWORD_OR_2FA_AUTH_TOKEN_HERE'
@@ -32,19 +27,22 @@ if (!(Test-Path($saveDir))) {
 `$env:gist_id         = 'YOUR_GIST_ID_CREATE_GIST_SAVE_ID_HERE'
 "@ | Out-File $PSScriptRoot\..\au\update_vars.ps1 -NoClobber
 
+#
 # Uncomment these next lines if you are using AU
 # and have WMF3+ installed.
 # Otherwise you need to find a way to install PowerShell PackageManagement
 
-# WMF3/4 only
-#choco upgrade dotnet4.5.1 -y
-#choco upgrade powershell-packagemanagement --ignore-dependencies -y
-#refreshenv # You need the Chocolatey profile installed for this to work properly (Choco v0.9.10.0+).
+# WMF 3/4 only
+if ($PSVersionTable.PSVersion -lt $(New-Object System.Version("5.0.0.0"))) {
+  choco install dotnet4.5.1 -y
+  choco upgrade powershell-packagemanagement --ignore-dependencies -y
+}
 
-#choco install ruby -y
-#gem install gist
+choco install ruby -y
+refreshenv # You need the Chocolatey profile installed for this to work properly (Choco v0.9.10.0+).
+gem install gist --no-ri --no-rdoc
 
-#Install-PackageProvider -Name NuGet -Force
-#Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
-#Install-Module au -Scope CurrentUser
+Install-PackageProvider -Name NuGet -Force
+Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
+Install-Module au -Scope AllUsers
 #Get-Module au -ListAvailable | select Name, Version

+ 11 - 0
setup/ketarin_setup.ps1

@@ -0,0 +1,11 @@
+# If you change this value, also change it in the global settings
+# The name will also be saveDir
+$saveDir = "c:\chocolatey-auto-save"
+
+Write-Host "Ensuring that the Ketarin auto save folder is set appropriately."
+if (!(Test-Path($saveDir))) {
+  mkdir $saveDir
+}
+
+choco upgrade chocolateypackageupdater -y
+choco upgrade ketarin -y