Browse Source

(au) add push/force variables

Rob Reynolds 7 years ago
parent
commit
4da67c9e5f
3 changed files with 20 additions and 7 deletions
  1. 2 0
      appveyor.yml
  2. 16 7
      au/update_all.ps1
  3. 2 0
      setup/au_setup.ps1

+ 2 - 0
appveyor.yml

@@ -12,6 +12,8 @@ environment:
   # au job parameters
   au_timeout: 100
   au_threads: 10
+  au_push: true
+  au_force: false
 
   # Github credentials - used to save result to gist and to commit pushed packages to the git repository
   github_user: YOUR_USER_NAME_HERE

+ 16 - 7
au/update_all.ps1

@@ -9,22 +9,23 @@ if (Test-Path update_vars.ps1) { . ./update_vars.ps1 }
 $options = @{
     Timeout = $env:au_timeout
     Push    = $true
-    Threads = $env:au_threads 10
+    Threads = $env:au_threads
+    Force   = $false
 
     Mail = if ($env:mail_user) {
+            $enableSsl = $true
+            if ($env:mail_enablessl -eq 'false') {
+                $enableSsl = $false
+            }
+
             @{
                 To        = $env:mail_user
                 Server    = $env:mail_server
                 UserName  = $env:mail_user
                 Password  = $env:mail_pass
                 Port      = $env:mail_port
-                EnableSsl = $true
-            }
-
-            if ($env:mail_enablessl -eq 'false') {
-                Mail.EnableSsl = $false
+                EnableSsl = $enableSsl
             }
-
            } else {}
 
     Gist_ID = $Env:Gist_ID
@@ -40,6 +41,14 @@ $options = @{
     }
 }
 
+if ($env:au_push -eq 'false') {
+  $options.Push = $false
+}
+
+if ($env:au_force -eq 'true') {
+  $options.Force = $true
+}
+
 Update-AUPackages -Name $Name -Options $options | ft
 $global:updateall = Import-CliXML $PSScriptRoot\update_info.xml
 

+ 2 - 0
setup/au_setup.ps1

@@ -7,6 +7,8 @@
 # Job parameters
 `$env:au_timeout      = '100'
 `$env:au_threads      = '10'
+`$env:au_push         = 'true'
+`$env:au_force        = 'false'
 
 # Github credentials - used to save result to gist and to commit pushed packages to the git repository
 `$env:github_user     = 'YOUR_USER_NAME_HERE'