Jelajahi Sumber

For Travis CI - attempt to fix git push from detached HEAD.
[ci skip]

Yao Wei Tjong 姚伟忠 12 tahun lalu
induk
melakukan
ff1c73170a
1 mengubah file dengan 4 tambahan dan 3 penghapusan
  1. 4 3
      Rakefile

+ 4 - 3
Rakefile

@@ -16,7 +16,8 @@ task :travis do
   system 'cp doc-Build/_includes/Doxygen/minimal-* Docs' or abort 'Failed to copy minimal-themed template'
   # Generate and sync doxygen pages
   system 'cd Build && make doc >/dev/null 2>&1 && rsync -a --delete ../Docs/html/ ../doc-Build/documentation' or abort 'Failed to generate/rsync doxygen pages'
-  # Supply GIT credentials and push to GitHub
-  system "msg=`git log --format=%B -n 1 $TRAVIS_COMMIT`; export msg && cd doc-Build && git config user.name '#{ENV['GIT_NAME']}' && git config user.email '#{ENV['GIT_EMAIL']}' && git remote set-url --push origin https://#{ENV['GH_TOKEN']}@github.com/urho3d/urho3d.github.io.git && git add -A && git commit -q -a -m \"Travis CI: site documentation update at #{Time.now.utc}.\n\nCommit: https://github.com/urho3d/Urho3D/commit/$TRAVIS_COMMIT\n\nMessage: $msg\" && git push -q" or abort 'Failed or nothing to push'
-  system "git config user.name '#{ENV['GIT_NAME']}' && git config user.email '#{ENV['GIT_EMAIL']}' && git remote set-url --push origin https://#{ENV['GH_TOKEN']}@github.com/urho3d/Urho3D.git && git add Docs/*API* && git commit -q -a -m 'Travis CI: API documentation update at #{Time.now.utc}.\n[ci skip]' && git push -q"
+  # Supply GIT credentials and push site documentation to urho3d/urho3d.github.io.git
+  system "msg=`git log --format=%B -n 1 $TRAVIS_COMMIT`; export msg && cd doc-Build && git config user.name '#{ENV['GIT_NAME']}' && git config user.email '#{ENV['GIT_EMAIL']}' && git remote set-url --push origin https://#{ENV['GH_TOKEN']}@github.com/urho3d/urho3d.github.io.git && git add -A . && git commit -q -m \"Travis CI: site documentation update at #{Time.now.utc}.\n\nCommit: https://github.com/urho3d/Urho3D/commit/$TRAVIS_COMMIT\n\nMessage: $msg\" && git push -q" or abort 'Failed or nothing to push'
+  # Supply GIT credentials and push API documentation to urho3d/Urho3D.git (the push may not be successful if detached HEAD is not a fast forward of remote master)
+  system "git config user.name '#{ENV['GIT_NAME']}' && git config user.email '#{ENV['GIT_EMAIL']}' && git remote set-url --push origin https://#{ENV['GH_TOKEN']}@github.com/urho3d/Urho3D.git && git add Docs/*API* && git commit -q -m 'Travis CI: API documentation update at #{Time.now.utc}.\n[ci skip]' && git push origin HEAD:master -q"
 end