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.
--- 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