|
|
@@ -125,21 +125,23 @@ task :ci_site_update do
|
|
|
else
|
|
|
instruction = 'package'
|
|
|
end
|
|
|
- # Supply GIT credentials and push API documentation to urho3d/Urho3D.git (the push may not be successful if remote master has already diverged)
|
|
|
- system 'pwd && git config user.name $GIT_NAME && git config user.email $GIT_EMAIL && git remote set-url --push origin https://[email protected]/$TRAVIS_REPO_SLUG.git && git add Docs/*API*'
|
|
|
- if system("git commit -q -m 'Travis CI: API documentation update at #{Time.now.utc}.\n[ci #{instruction}]'") && !ENV['PACKAGE_UPLOAD']
|
|
|
- bump_soversion 'Source/Engine/.soversion' or abort 'Failed to bump soversion'
|
|
|
- system "git add Source/Engine/.soversion && git commit --amend -q -m 'Travis CI: API documentation update at #{Time.now.utc}.\n[ci #{instruction}]'" or abort 'Failed to stage .soversion file'
|
|
|
+ if !ENV['RELEASE_TAG']
|
|
|
+ # Supply GIT credentials and push API documentation to urho3d/Urho3D.git (the push may not be successful if remote master has already diverged)
|
|
|
+ system 'pwd && git config user.name $GIT_NAME && git config user.email $GIT_EMAIL && git remote set-url --push origin https://[email protected]/$TRAVIS_REPO_SLUG.git && git add Docs/*API*'
|
|
|
+ if system("git commit -q -m 'Travis CI: API documentation update at #{Time.now.utc}.\n[ci #{instruction}]'") && !ENV['PACKAGE_UPLOAD']
|
|
|
+ bump_soversion 'Source/Engine/.soversion' or abort 'Failed to bump soversion'
|
|
|
+ system "git add Source/Engine/.soversion && git commit --amend -q -m 'Travis CI: API documentation update at #{Time.now.utc}.\n[ci #{instruction}]'" or abort 'Failed to stage .soversion file'
|
|
|
+ end
|
|
|
+ system "git push origin HEAD:master -q >/dev/null 2>&1" or abort 'Failed to update API documentation, most likely due to remote master has diverged, the API documentation update will be performed again in the subsequent CI build'
|
|
|
end
|
|
|
- system "git push origin HEAD:master -q >/dev/null 2>&1" or abort 'Failed to update API documentation, most likely due to remote master has diverged, the API documentation update will be performed again in the subsequent CI build'
|
|
|
end
|
|
|
|
|
|
# Usage: NOT intended to be used manually (if you insist then try: GIT_NAME=... GIT_EMAIL=... GH_TOKEN=... rake ci_rebase)
|
|
|
desc 'Rebase all CI mirror branches'
|
|
|
task :ci_rebase do
|
|
|
system 'git config user.name $GIT_NAME && git config user.email $GIT_EMAIL && git remote set-url --push origin https://[email protected]/$TRAVIS_REPO_SLUG.git'
|
|
|
- head = `git rev-parse --short HEAD`
|
|
|
- [ 'Android-CI', 'RPI-CI', 'OSX-CI' ].each { |branch| system "git fetch origin #{branch}:#{branch} && git rebase HEAD #{branch} && git push -qf -u origin #{branch} >/dev/null 2>&1 && git checkout -q #{head}" or abort "Failed to rebase #{branch} mirror branch" }
|
|
|
+ baseline = ENV['RELEASE_TAG'] || "origin/#{ENV['TRAVIS_BRANCH']}"
|
|
|
+ [ 'Android-CI', 'RPI-CI', 'OSX-CI' ].each { |branch| system "git fetch origin #{branch}:#{branch} && git rebase #{baseline} #{branch} && git push -qf -u origin #{branch} >/dev/null 2>&1" or abort "Failed to rebase #{branch} mirror branch" }
|
|
|
end
|
|
|
|
|
|
# Usage: NOT intended to be used manually (if you insist then try: rake ci_package_upload)
|