[SCM] ci-tooling packaging branch, master, updated. 68a9c5b1f6130f114d9b3d04446799f949212ce1
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Thu Jan 14 13:56:17 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=68a9c5b
The following commit has been merged in the master branch:
commit 68a9c5b1f6130f114d9b3d04446799f949212ce1
Author: Harald Sitter <sitter at kde.org>
Date: Thu Jan 14 14:56:02 2016 +0100
detangle custom_ci further to unbreak github and fix logic fallbacks
---
lib/projects.rb | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/lib/projects.rb b/lib/projects.rb
index 358bfb4..ed18f0a 100644
--- a/lib/projects.rb
+++ b/lib/projects.rb
@@ -235,29 +235,29 @@ class ProjectFactory
fail "Unknown type #{custom_ci['type']}"
end
repos = []
+ # Special type handling.
case custom_ci['type']
when 'github'
+ require 'octokit'
+ custom_ci['git_host'] = 'https://github.com/'
+ if custom_ci['repos'] == ['all']
+ octo_repos = Octokit.organization_repositories(custom_ci['org'])
+ octo_repos.each do |octo_repo|
+ repos << octo_repo[:name]
+ end
+ end
+ end
+ # Ultimate fallback if special type handling failed to produce repos.
+ if repos.empty?
if custom_ci['repos'] == ['all']
repos = `ssh #{custom_ci['git_host']} ls /`.chop!.gsub!('.git', '')
repos = repos.split(' ')
else
- require 'octokit'
- custom_ci['git_host'] = 'https://github.com/'
- if custom_ci['repos'] == ['all']
- octo_repos = Octokit.organization_repositories(custom_ci['org'])
- octo_repos.each do |octo_repo|
- repos << octo_repo[:name]
- end
- else
- repos = custom_ci['repos']
- end
+ repos = custom_ci['repos']
end
- when 'neon'
- custom_ci['git_host'] = 'git://packaging.neon.kde.org.uk'
- repos = custom_ci['repos']
- else
- repos = custom_ci['repos']
end
+ fail if repos.empty? # Shouldn't be empty here. Must be something wrong
+ # Create actual Project instances.
repos.each do |repo|
begin
ret << Project.new(repo, custom_ci['org'], custom_ci['git_host'],
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list