|
@@ -73,7 +73,7 @@ end
|
|
|
desc 'Configure, build, and test Urho3D project'
|
|
desc 'Configure, build, and test Urho3D project'
|
|
|
task :ci do
|
|
task :ci do
|
|
|
# Unshallow the clone's history when necessary
|
|
# Unshallow the clone's history when necessary
|
|
|
- if ENV['CI'] && ENV['PACKAGE_UPLOAD'] && ENV['RELEASE_TAG'].empty?
|
|
|
|
|
|
|
+ if ENV['CI'] && ENV['PACKAGE_UPLOAD'] && !ENV['RELEASE_TAG']
|
|
|
system 'git fetch --unshallow' or abort 'Failed to unshallow cloned repository'
|
|
system 'git fetch --unshallow' or abort 'Failed to unshallow cloned repository'
|
|
|
end
|
|
end
|
|
|
# Packaging always use Release configuration (temporary workaround due to Travis-CI insufficient memory, also always use Release configuration for MinGW and Android build)
|
|
# Packaging always use Release configuration (temporary workaround due to Travis-CI insufficient memory, also always use Release configuration for MinGW and Android build)
|
|
@@ -108,7 +108,7 @@ task :ci_site_update do
|
|
|
# Setup doxygen to use minimal theme
|
|
# Setup doxygen to use minimal theme
|
|
|
system "ruby -i -pe 'BEGIN { a = {%q{HTML_HEADER} => %q{minimal-header.html}, %q{HTML_FOOTER} => %q{minimal-footer.html}, %q{HTML_STYLESHEET} => %q{minimal-doxygen.css}, %q{HTML_COLORSTYLE_HUE} => 200, %q{HTML_COLORSTYLE_SAT} => 0, %q{HTML_COLORSTYLE_GAMMA} => 20, %q{DOT_IMAGE_FORMAT} => %q{svg}, %q{INTERACTIVE_SVG} => %q{YES}} }; a.each {|k, v| gsub(/\#{k}\s*?=.*?\n/, %Q{\#{k} = \#{v}\n}) }' Docs/Doxyfile" or abort 'Failed to setup doxygen configuration file'
|
|
system "ruby -i -pe 'BEGIN { a = {%q{HTML_HEADER} => %q{minimal-header.html}, %q{HTML_FOOTER} => %q{minimal-footer.html}, %q{HTML_STYLESHEET} => %q{minimal-doxygen.css}, %q{HTML_COLORSTYLE_HUE} => 200, %q{HTML_COLORSTYLE_SAT} => 0, %q{HTML_COLORSTYLE_GAMMA} => 20, %q{DOT_IMAGE_FORMAT} => %q{svg}, %q{INTERACTIVE_SVG} => %q{YES}} }; a.each {|k, v| gsub(/\#{k}\s*?=.*?\n/, %Q{\#{k} = \#{v}\n}) }' Docs/Doxyfile" or abort 'Failed to setup doxygen configuration file'
|
|
|
system 'cp doc-Build/_includes/Doxygen/minimal-* Docs' or abort 'Failed to copy minimal-themed template'
|
|
system 'cp doc-Build/_includes/Doxygen/minimal-* Docs' or abort 'Failed to copy minimal-themed template'
|
|
|
- release = ENV['RELEASE_TAG'].empty? ? 'HEAD' : ENV['RELEASE_TAG'];
|
|
|
|
|
|
|
+ release = ENV['RELEASE_TAG'] || 'HEAD'
|
|
|
unless release == 'HEAD'
|
|
unless release == 'HEAD'
|
|
|
system "mkdir -p doc-Build/documentation/#{release}" or abort 'Failed to create directory for new document version'
|
|
system "mkdir -p doc-Build/documentation/#{release}" or abort 'Failed to create directory for new document version'
|
|
|
system "ruby -i -pe 'gsub(/HEAD/, %q{#{release}})' Docs/minimal-header.html" or abort 'Failed to update document version in YAML Front Matter block'
|
|
system "ruby -i -pe 'gsub(/HEAD/, %q{#{release}})' Docs/minimal-header.html" or abort 'Failed to update document version in YAML Front Matter block'
|
|
@@ -134,11 +134,10 @@ task :ci_site_update do
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
# Usage: NOT intended to be used manually (if you insist then try: GIT_NAME=... GIT_EMAIL=... GH_TOKEN=... rake ci_rebase)
|
|
# Usage: NOT intended to be used manually (if you insist then try: GIT_NAME=... GIT_EMAIL=... GH_TOKEN=... rake ci_rebase)
|
|
|
-desc 'Rebase Android-CI and OSX-CI mirror branches'
|
|
|
|
|
|
|
+desc 'Rebase all CI mirror branches'
|
|
|
task :ci_rebase do
|
|
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 && git fetch origin Android-CI:Android-CI && git rebase origin/master Android-CI && git push -qf -u origin Android-CI >/dev/null 2>&1' or abort 'Failed to rebase Android-CI mirror branch'
|
|
|
|
|
- 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 && git fetch origin RPI-CI:RPI-CI && git rebase origin/master RPI-CI && git push -qf -u origin RPI-CI >/dev/null 2>&1' or abort 'Failed to rebase RPI-CI mirror branch'
|
|
|
|
|
- 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 && git fetch origin OSX-CI:OSX-CI && git rebase origin/master OSX-CI && git push -qf -u origin OSX-CI >/dev/null 2>&1' or abort 'Failed to rebase OSX-CI mirror branch'
|
|
|
|
|
|
|
+ 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'
|
|
|
|
|
+ [ 'Android-CI', 'RPI-CI', 'OSX-CI' ].each { |branch| system "git fetch origin #{branch}:#{branch} && git rebase #{ENV['TRAVIS_BRANCH']} #{branch} && git push -qf -u origin #{branch} >/dev/null 2>&1" or abort "Failed to rebase #{branch} mirror branch" }
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
# Usage: NOT intended to be used manually (if you insist then try: rake ci_package_upload)
|
|
# Usage: NOT intended to be used manually (if you insist then try: rake ci_package_upload)
|
|
@@ -192,7 +191,7 @@ task :ci_package_upload do
|
|
|
end
|
|
end
|
|
|
# Determine the upload location
|
|
# Determine the upload location
|
|
|
setup_digital_keys
|
|
setup_digital_keys
|
|
|
- if ENV['RELEASE_TAG'].empty?
|
|
|
|
|
|
|
+ if !ENV['RELEASE_TAG']
|
|
|
upload_dir = "/home/frs/project/#{ENV['TRAVIS_REPO_SLUG']}/Snapshots"
|
|
upload_dir = "/home/frs/project/#{ENV['TRAVIS_REPO_SLUG']}/Snapshots"
|
|
|
if ENV['SITE_UPDATE']
|
|
if ENV['SITE_UPDATE']
|
|
|
# Download source packages from GitHub
|
|
# Download source packages from GitHub
|