瀏覽代碼

(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
 
 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:
 #- 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"
     $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"
     git push