Преглед на файлове

(GH-5) Ensure AppVeyor doesn't run on its commits

Use [skip-ci] token to skip the build in the commit script. This
will ensure that the commit is skipped for the build, but it will
still run when the cron schedule runs.
Rob Reynolds преди 7 години
родител
ревизия
b70442f336
променени са 2 файла, в които са добавени 4 реда и са изтрити 7 реда
  1. 1 6
      appveyor.yml
  2. 3 1
      au/scripts/Save-Git.ps1

+ 1 - 6
appveyor.yml

@@ -56,12 +56,7 @@ install:
     Get-Module au -ListAvailable | select Name, Version
     Get-Module au -ListAvailable | select Name, Version
 
 
 build_script:
 build_script:
-- ps: |
-    if ($Env:APPVEYOR_REPO_COMMIT_AUTHOR -eq 'Chocolatey') {
-        "Build triggered by appveyor commit, aborting"
-    } else {
-        .\au\update_all.ps1
-    }
+- ps: .\au\update_all.ps1
 
 
 #on_finish:
 #on_finish:
 #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
 #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

+ 3 - 1
au/scripts/Save-Git.ps1

@@ -9,7 +9,9 @@ function Save-Git() {
 
 
     "Commiting updated packages to git repository"
     "Commiting updated packages to git repository"
     $pushed | % { git add $_.PackageName }
     $pushed | % { git add $_.PackageName }
-    git commit -m "UPDATE BOT: $($Info.pushed) packages updated"
+    git commit -m "UPDATE BOT: $($Info.pushed) packages updated
+
+    [skip-ci]"
 
 
     "Pushing git changes"
     "Pushing git changes"
     git push
     git push