Browse Source

(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 năm trước cách đây
mục cha
commit
b70442f336
2 tập tin đã thay đổi với 4 bổ sung7 xóa
  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