Added a flag to force kiwix build to not do fast_clone

- Docopt cannot do fast_clone cause it is getting a
    specific commit id. This will be changed when a new
    release is available.
This commit is contained in:
MiguelRocha 2020-05-06 13:00:08 +01:00 committed by Matthieu Gautier
parent 69c33da0bc
commit e72589a850
2 changed files with 3 additions and 1 deletions

View File

@ -132,6 +132,7 @@ class ReleaseDownload(Source):
class GitClone(Source): class GitClone(Source):
base_git_ref = "master" base_git_ref = "master"
force_full_clone = False
@property @property
def release_git_ref(self): def release_git_ref(self):
@ -156,7 +157,7 @@ class GitClone(Source):
return self.base_git_ref return self.base_git_ref
def _git_init(self, context): def _git_init(self, context):
if option('fast_clone'): if option('fast_clone') and self.force_full_clone == False:
command = "git clone --depth=1 --branch {} {} {}".format( command = "git clone --depth=1 --branch {} {} {}".format(
self.git_ref, self.git_remote, self.source_dir) self.git_ref, self.git_remote, self.source_dir)
run_command(command, neutralEnv('source_dir'), context) run_command(command, neutralEnv('source_dir'), context)

View File

@ -13,6 +13,7 @@ class docoptcpp(Dependency):
class Source(GitClone): class Source(GitClone):
git_remote = "https://github.com/docopt/docopt.cpp.git" git_remote = "https://github.com/docopt/docopt.cpp.git"
git_dir = "docopt.cpp" git_dir = "docopt.cpp"
force_full_clone = True
git_ref = "3dd23e3280f213bacefdf5fcb04857bf52e90917" git_ref = "3dd23e3280f213bacefdf5fcb04857bf52e90917"
class Builder(CMakeBuilder): class Builder(CMakeBuilder):