cleepcli 1.35.2__tar.gz → 1.36.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cleepcli-1.35.2/cleepcli.egg-info → cleepcli-1.36.0}/PKG-INFO +1 -1
- {cleepcli-1.35.2 → cleepcli-1.36.0}/bin/ccli +7 -5
- {cleepcli-1.35.2 → cleepcli-1.36.0}/bin/cleep-cli +7 -5
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/git.py +31 -9
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/version.py +1 -1
- {cleepcli-1.35.2 → cleepcli-1.36.0/cleepcli.egg-info}/PKG-INFO +1 -1
- {cleepcli-1.35.2 → cleepcli-1.36.0}/LICENSE +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/MANIFEST.in +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/README.md +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/__init__.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/check.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/ci.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/cleepapi.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/config.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/console.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/docs.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/file.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/module.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/package.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/test.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/tools.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli/watch.py +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli.egg-info/SOURCES.txt +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli.egg-info/dependency_links.txt +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli.egg-info/requires.txt +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/cleepcli.egg-info/top_level.txt +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/setup.cfg +0 -0
- {cleepcli-1.35.2 → cleepcli-1.36.0}/setup.py +0 -0
|
@@ -48,12 +48,13 @@ PRAGMA_NO_COVER_PATTERN = r'#\s*pragma\s*:\s*no\s+cover'
|
|
|
48
48
|
def core():
|
|
49
49
|
pass
|
|
50
50
|
|
|
51
|
-
def get_core_mods(git=None):
|
|
51
|
+
def get_core_mods(git=None, branch=None):
|
|
52
52
|
"""
|
|
53
53
|
Get all core modules from their repos
|
|
54
54
|
|
|
55
55
|
Args:
|
|
56
56
|
git (Git): Git instance. Create new instance if not provided
|
|
57
|
+
branch (str): branch name
|
|
57
58
|
|
|
58
59
|
Returns:
|
|
59
60
|
bool: True if modules installed successfully
|
|
@@ -63,9 +64,9 @@ def get_core_mods(git=None):
|
|
|
63
64
|
for module in config.DEFAULT_MODULES:
|
|
64
65
|
module_path = os.path.join(config.MODULES_SRC, module)
|
|
65
66
|
if not os.path.exists(module_path):
|
|
66
|
-
res = g.clone_mod(module)
|
|
67
|
+
res = g.clone_mod(module, branch)
|
|
67
68
|
else:
|
|
68
|
-
res = g.pull_mod(module)
|
|
69
|
+
res = g.pull_mod(module, branch)
|
|
69
70
|
|
|
70
71
|
if not res:
|
|
71
72
|
logging.error('Error getting "%s" default module' % module)
|
|
@@ -843,11 +844,12 @@ def cimoddocpublish(module, version, ghtoken):
|
|
|
843
844
|
@ci.command(hidden=True)
|
|
844
845
|
@click.pass_context
|
|
845
846
|
@click.option('--nosync', is_flag=True, default=False, help='Sync mods.')
|
|
846
|
-
|
|
847
|
+
@click.option('--branch', default=None, help='Get apps specific branch')
|
|
848
|
+
def cigetmods(ctx, nosync, branch):
|
|
847
849
|
"""
|
|
848
850
|
Get all core modules from git repos
|
|
849
851
|
"""
|
|
850
|
-
if not get_core_mods():
|
|
852
|
+
if not get_core_mods(branch=branch):
|
|
851
853
|
sys.exit(1)
|
|
852
854
|
|
|
853
855
|
if not nosync:
|
|
@@ -48,12 +48,13 @@ PRAGMA_NO_COVER_PATTERN = r'#\s*pragma\s*:\s*no\s+cover'
|
|
|
48
48
|
def core():
|
|
49
49
|
pass
|
|
50
50
|
|
|
51
|
-
def get_core_mods(git=None):
|
|
51
|
+
def get_core_mods(git=None, branch=None):
|
|
52
52
|
"""
|
|
53
53
|
Get all core modules from their repos
|
|
54
54
|
|
|
55
55
|
Args:
|
|
56
56
|
git (Git): Git instance. Create new instance if not provided
|
|
57
|
+
branch (str): branch name
|
|
57
58
|
|
|
58
59
|
Returns:
|
|
59
60
|
bool: True if modules installed successfully
|
|
@@ -63,9 +64,9 @@ def get_core_mods(git=None):
|
|
|
63
64
|
for module in config.DEFAULT_MODULES:
|
|
64
65
|
module_path = os.path.join(config.MODULES_SRC, module)
|
|
65
66
|
if not os.path.exists(module_path):
|
|
66
|
-
res = g.clone_mod(module)
|
|
67
|
+
res = g.clone_mod(module, branch)
|
|
67
68
|
else:
|
|
68
|
-
res = g.pull_mod(module)
|
|
69
|
+
res = g.pull_mod(module, branch)
|
|
69
70
|
|
|
70
71
|
if not res:
|
|
71
72
|
logging.error('Error getting "%s" default module' % module)
|
|
@@ -843,11 +844,12 @@ def cimoddocpublish(module, version, ghtoken):
|
|
|
843
844
|
@ci.command(hidden=True)
|
|
844
845
|
@click.pass_context
|
|
845
846
|
@click.option('--nosync', is_flag=True, default=False, help='Sync mods.')
|
|
846
|
-
|
|
847
|
+
@click.option('--branch', default=None, help='Get apps specific branch')
|
|
848
|
+
def cigetmods(ctx, nosync, branch):
|
|
847
849
|
"""
|
|
848
850
|
Get all core modules from git repos
|
|
849
851
|
"""
|
|
850
|
-
if not get_core_mods():
|
|
852
|
+
if not get_core_mods(branch=branch):
|
|
851
853
|
sys.exit(1)
|
|
852
854
|
|
|
853
855
|
if not nosync:
|
|
@@ -57,46 +57,68 @@ class Git():
|
|
|
57
57
|
self.logger.info('Done')
|
|
58
58
|
return True
|
|
59
59
|
|
|
60
|
-
def pull_mod(self, module):
|
|
60
|
+
def pull_mod(self, module, branch):
|
|
61
61
|
"""
|
|
62
62
|
Pull module content
|
|
63
63
|
|
|
64
64
|
Args:
|
|
65
65
|
module (string): module name
|
|
66
|
+
branch (str): branch name
|
|
66
67
|
"""
|
|
67
68
|
self.logger.info('Pulling "%s" module repository...' % module)
|
|
68
69
|
c = Console()
|
|
69
70
|
module_path = os.path.join(config.MODULES_SRC, module)
|
|
70
|
-
|
|
71
|
+
|
|
72
|
+
if branch:
|
|
73
|
+
cmd = f'cd "{module_path}"; git checkout "{branch}"'
|
|
74
|
+
self.logger.debug('cmd: %s' % cmd)
|
|
75
|
+
resp = c.command(cmd, 60)
|
|
76
|
+
self.logger.debug('Checkout resp: %s' % resp)
|
|
77
|
+
if resp['returncode'] != 0:
|
|
78
|
+
self.logger.error('Error occured while checking out "%s" mod "%s": %s', module, branch, 'killed' if resp['killed'] else resp['stderr'])
|
|
79
|
+
return False
|
|
80
|
+
|
|
81
|
+
cmd = f'cd "{module_path}"; git pull -q'
|
|
71
82
|
self.logger.debug('cmd: %s' % cmd)
|
|
72
83
|
resp = c.command(cmd, 60)
|
|
73
84
|
self.logger.debug('Pull resp: %s' % resp)
|
|
74
|
-
if resp['
|
|
75
|
-
self.logger.error('Error occured while pulling "%s" mod repository: %s'
|
|
85
|
+
if resp['returncode'] != 0:
|
|
86
|
+
self.logger.error('Error occured while pulling "%s" mod repository: %s', module, 'killed' if resp['killed'] else resp['stderr'])
|
|
76
87
|
return False
|
|
77
88
|
|
|
78
89
|
self.logger.info('Done')
|
|
79
90
|
return True
|
|
80
91
|
|
|
81
|
-
def clone_mod(self, module):
|
|
92
|
+
def clone_mod(self, module, branch=None):
|
|
82
93
|
"""
|
|
83
94
|
Clone core content from official repository
|
|
84
95
|
|
|
85
96
|
Args:
|
|
86
97
|
module (string): module name
|
|
98
|
+
branch (str): branch name
|
|
87
99
|
"""
|
|
88
100
|
self.logger.info('Cloning "%s" module repository...' % module)
|
|
89
101
|
c = Console()
|
|
90
102
|
url = config.MODULES_REPO_URL[module]
|
|
91
103
|
module_path = os.path.join(config.MODULES_SRC, module)
|
|
92
|
-
cmd = 'git clone -q "
|
|
104
|
+
cmd = f'git clone -q "{url}" "{module_path}"'
|
|
93
105
|
self.logger.debug('cmd: %s' % cmd)
|
|
94
|
-
resp = c.command(cmd, timeout=
|
|
106
|
+
resp = c.command(cmd, timeout=60)
|
|
95
107
|
self.logger.debug('Clone resp: %s' % resp)
|
|
96
|
-
if resp['
|
|
108
|
+
if resp['returncode'] != 0:
|
|
97
109
|
self.logger.error('Error occured while cloning "%s" mod repository: %s' % (module, 'killed' if resp['killed'] else resp['stderr']))
|
|
98
110
|
return False
|
|
99
|
-
|
|
111
|
+
|
|
112
|
+
if branch:
|
|
113
|
+
cmd = f'cd "{module_path}" && git checkout "{branch}"'
|
|
114
|
+
self.logger.debug('cmd: %s' % cmd)
|
|
115
|
+
resp = c.command(cmd, timeout=60)
|
|
116
|
+
self.logger.debug('Checkout resp: %s' % resp)
|
|
117
|
+
if resp['returncode'] != 0:
|
|
118
|
+
self.logger.error('Error occured while checking out "%s" mod "%s": %s', module, branch, 'killed' if resp['killed'] else resp['stderr'])
|
|
119
|
+
return False
|
|
120
|
+
|
|
121
|
+
|
|
100
122
|
self.logger.info('Done')
|
|
101
123
|
return True
|
|
102
124
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|