[jenkinscat-docs] master: Disabled books should be handled differently. (b298445)
immanetize at fedoraproject.org
immanetize at fedoraproject.org
Fri Feb 6 07:40:54 UTC 2015
Repository : http://git.fedorahosted.org/cgit/jenkinscat-docs.git
On branch : master
>---------------------------------------------------------------
commit b2984457cf7c6f86a37cf4e8ae9bff7b723a29cb
Author: Pavel Tisnovsky <ptisnovs at redhat.com>
Date: Fri Jan 16 10:43:16 2015 +0100
Disabled books should be handled differently.
>---------------------------------------------------------------
ChangeLog | 5 +++++
tools/create_books_clj_file.lua | 20 ++++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5686117..98ff1c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-16 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * tools/create_books_clj_file.lua:
+ Disabled books should be handled differently.
+
2015-01-15 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/jenkinscat/server.clj:
diff --git a/tools/create_books_clj_file.lua b/tools/create_books_clj_file.lua
index 980f14b..03600c5 100644
--- a/tools/create_books_clj_file.lua
+++ b/tools/create_books_clj_file.lua
@@ -643,6 +643,26 @@ function printKnownBooks(knownBooks)
end
end
+function isDisabledBook(book, disabledBooks)
+ local bookName = book.name
+ for i,disabledBook in ipairs(disabledBooks) do
+ if bookName == disabledBook then
+ return true
+ end
+ end
+ return false
+end
+
+function filterOutDisabledJobs(books, disabledBooks)
+ local result = {}
+ for i, book in ipairs(books) do
+ if not isDisabledBook(book, disabledBooks) then
+ table.insert(result, book)
+ end
+ end
+ return result
+end
+
--
-- Entry point to this tool.
--
More information about the docs-commits
mailing list