From ee69c088c2cba082ed4a59896657ab1f8647441a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 28 Jul 2024 21:48:52 +0200 Subject: [PATCH] clone/gitlab --- readme.md | 1 - spcd/__init__.py | 31 ++++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/readme.md b/readme.md index 68983cc..96dd8ef 100644 --- a/readme.md +++ b/readme.md @@ -104,5 +104,4 @@ from various contexts of CA, CI and OCI / OS. ### .sh * check if file & variable match -* clone branch if not gitlab * support opensuse diff --git a/spcd/__init__.py b/spcd/__init__.py index 90442b2..2403025 100644 --- a/spcd/__init__.py +++ b/spcd/__init__.py @@ -17,24 +17,25 @@ COMMANDS_PREFIX = "spcd-" def clone_project_branch() -> None: - step("Clone project branch") - log.info(projects) - split() - log.info(project) - split() - log.info(f"""\ + if not projects.environment.get("GITLAB_CI"): + step("Clone project branch") + log.info(projects) + split() + log.info(project) + split() + log.info(f"""\ {project.url} ↓ """) - run( - "git", - "clone", - "--branch", - project.branch, - "--", - project.url, - project.root, - ) + run( + "git", + "clone", + "--branch", + project.branch, + "--", + project.url, + project.root, + ) def install_commands(path: str) -> None: