From ecfef34daa7f258a9d769db06bcdc9ef70190a19 Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Fri, 1 Nov 2024 11:35:42 +0100 Subject: [PATCH] V3.3.1: - allow "cm/cmx pull repo {URL}" along with "cm/cmx pull repo --url={URL}" - CMX: added "automation_full_path" to -log --- cm/CHANGES.md | 4 ++++ cm/cmind/__init__.py | 2 +- cm/cmind/core.py | 3 +++ cm/cmind/repo/automation/repo/module.py | 6 ++++++ cm/requirements.txt | 1 + cm/setup.py | 2 +- 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cm/CHANGES.md b/cm/CHANGES.md index bc578b9cf..1c97cbdde 100644 --- a/cm/CHANGES.md +++ b/cm/CHANGES.md @@ -1,3 +1,7 @@ +## V3.3.1 + - allow "cm/cmx pull repo {URL}" along with "cm/cmx pull repo --url={URL}" + - CMX: added "automation_full_path" to -log + ## V3.2.9 - fixed minor bug with JSON console output - fixed minor bug with console in cmind.x function diff --git a/cm/cmind/__init__.py b/cm/cmind/__init__.py index 4172edc0d..9c7cd38d3 100644 --- a/cm/cmind/__init__.py +++ b/cm/cmind/__init__.py @@ -2,7 +2,7 @@ # # Written by Grigori Fursin -__version__ = "3.2.9" +__version__ = "3.3.1" from cmind.core import access from cmind.core import x diff --git a/cm/cmind/core.py b/cm/cmind/core.py index d4a15c4dc..3e5611394 100644 --- a/cm/cmind/core.py +++ b/cm/cmind/core.py @@ -1341,6 +1341,9 @@ def _x(self, i, control): loaded_common_automation = True # Finalize automation class initialization + if not self.logger == None: + self.log(f"x automation_full_path: {automation_full_path}", "info") + initialized_automation = loaded_automation_class(self, automation_full_path) initialized_automation.meta = automation_meta initialized_automation.full_path = automation_full_path diff --git a/cm/cmind/repo/automation/repo/module.py b/cm/cmind/repo/automation/repo/module.py index 6446e4559..3e2711f51 100644 --- a/cm/cmind/repo/automation/repo/module.py +++ b/cm/cmind/repo/automation/repo/module.py @@ -66,6 +66,12 @@ def pull(self, i): checkout_only = i.get('checkout_only', False) skip_zip_parent_dir = i.get('skip_zip_parent_dir', False) + # Check alias is URL + if url == '' and (alias.startswith('https://') or alias.startswith('git@')): + url = alias + alias = '' + + # Process URL and alias if url == '': if alias != '': url = self.cmind.cfg['repo_url_prefix'] diff --git a/cm/requirements.txt b/cm/requirements.txt index 859f84a20..53d344404 100644 --- a/cm/requirements.txt +++ b/cm/requirements.txt @@ -1,4 +1,5 @@ pyyaml requests setuptools +wheel giturlparse diff --git a/cm/setup.py b/cm/setup.py index 55895c69c..fcaa54881 100644 --- a/cm/setup.py +++ b/cm/setup.py @@ -94,7 +94,7 @@ def run(self): 'install': custom_install }, - install_requires=['pyyaml', 'requests', 'setuptools', 'giturlparse'], + install_requires=['pyyaml', 'requests', 'setuptools', 'wheel', 'giturlparse'], entry_points={"console_scripts": [ "cmind = cmind.cli:run",