Skip to content

Commit

Permalink
Git synchronization: global improvements (#346)
Browse files Browse the repository at this point in the history
- git handlers are more generic
- local and remote git handlers are tested specifically 

closes #344
  • Loading branch information
Guts authored Nov 16, 2023
2 parents db9bb58 + 00419df commit 96197aa
Show file tree
Hide file tree
Showing 12 changed files with 898 additions and 208 deletions.
12 changes: 6 additions & 6 deletions qgis_deployment_toolbelt/jobs/job_profiles_synchronizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@ def run(self) -> None:
if self.options.get("protocol") == "git":
if self.options.get("source").startswith(("git://", "http://", "https://")):
downloader = RemoteGitHandler(
remote_git_uri_or_path=self.options.get("source"),
branch=self.options.get("branch", "master"),
source_repository_url=self.options.get("source"),
branch_to_use=self.options.get("branch", "master"),
)
downloader.download(local_path=self.qdt_working_folder)
downloader.download(destination_local_path=self.qdt_working_folder)
elif self.options.get("source").startswith("file://"):
downloader = LocalGitHandler(
remote_git_uri_or_path=self.options.get("source"),
branch=self.options.get("branch", "master"),
source_repository_path_or_uri=self.options.get("source"),
branch_to_use=self.options.get("branch", "master"),
)
downloader.download(local_path=self.qdt_working_folder)
downloader.download(destination_local_path=self.qdt_working_folder)
else:
logger.error(
f"Source type not implemented yet: {self.options.get('source')}"
Expand Down
Loading

0 comments on commit 96197aa

Please sign in to comment.