Rakefiles: fixed tasks `workflow:*` to work on SWING CI
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 19 Jun 2018 21:26:26 +0100
changeset 241 481556cfa16d
parent 240 c002a607e884
child 244 8de3e1d78d6a
Rakefiles: fixed tasks `workflow:*` to work on SWING CI On SWING CI, sources of `stx:stc` and `stc:librun` (as well as `.hg` repository) are removed as soon as binaries are compiled (as safety neasure). Therefore, we have to check that there's really a physical mercurial repository in package working copy. Trusting `repo.type` is not enough as it may have been removed.
rakelib/workflow.rake
--- a/rakelib/workflow.rake	Tue Jun 19 19:06:01 2018 +0100
+++ b/rakelib/workflow.rake	Tue Jun 19 21:26:26 2018 +0100
@@ -9,7 +9,7 @@
     project.packages_and_application.each do |pkg|
       unless pkg.nested_package?
         repo = Rake::Stx::Configuration::Repository::find(pkg.repository)
-        if repo.type == :'hg'
+        if repo != nil and repo.type == :'hg' and (File.exists?(BUILD_DIR / pkg.directory / '.hg' / 'hgrc'))
           hg = HG::Repository.new(BUILD_DIR / pkg.directory)
           yield pkg, hg
         end