eva-shell 0.2.3__tar.gz → 0.2.5__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.
@@ -184,7 +184,7 @@ Copyright Altertech Group and other contributors, https://www.altertech.com/
184
184
 
185
185
  Common Clause 1.
186
186
 
187
- Trademark usage conditions: https://www.eva-ics.com/doc?p=trademarks
187
+ Trademark usage conditions: https://info.bma.ai/en/actual/trademarks.html
188
188
 
189
189
  END OF TERMS AND CONDITIONS
190
190
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eva-shell
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: EVA ICS v4 shell
5
5
  Home-page: https://github.com/eva-ics/eva4
6
6
  Author: Bohemia Automation / Altertech
@@ -1,3 +1,3 @@
1
- __version__ = '0.2.3'
1
+ __version__ = '0.2.5'
2
2
 
3
3
  DEFAULT_REPOSITORY_URL = 'https://pub.bma.ai/eva4'
@@ -1387,6 +1387,9 @@ def init_ap():
1387
1387
  p.add_argument('--test',
1388
1388
  action='store_true',
1389
1389
  help='install a build marked as test')
1390
+ p.add_argument('--target-version',
1391
+ metavar='VERSION:BUILD',
1392
+ help='update to a specific version/build')
1390
1393
 
1391
1394
  sp.add_parser('version', help='core version')
1392
1395
 
@@ -150,7 +150,8 @@ class CLI:
150
150
  args += ' --YES'
151
151
  exec_cmd('eva-cloud-manager', args)
152
152
 
153
- def update(self, download_timeout, repository_url, yes, info_only, test):
153
+ def update(self, download_timeout, repository_url, yes, info_only, test,
154
+ target_version):
154
155
  args = ''
155
156
  if current_command.debug:
156
157
  args += ' --verbose '
@@ -166,8 +167,20 @@ class CLI:
166
167
  if test:
167
168
  args += ' --test'
168
169
  old_ver = get_node_svc_info()
169
- exec_cmd('eva-cloud-manager', args)
170
- if not info_only:
170
+ if target_version:
171
+ env = {'EVA_UPDATE_FORCE_VERSION': target_version}
172
+ else:
173
+ env = None
174
+ exec_cmd('eva-cloud-manager', args, env=env)
175
+ if info_only:
176
+ print()
177
+ info = get_node_svc_info()
178
+ print('update other node to the current version:\n')
179
+ v = f'{info["version"]}:{info["build"]}'
180
+ print(colored(f' eva update --target-version {v}',
181
+ color='white'))
182
+ print()
183
+ else:
171
184
  if old_ver != get_node_svc_info():
172
185
  print('Update completed', end='')
173
186
  if common.interactive:
@@ -13,7 +13,7 @@ banner = """ _______ _____ _______________
13
13
  /_____/ |___/_/ |_| /___/\____//____/"""
14
14
 
15
15
  home_url = "www.eva-ics.com"
16
- copyright = "(c) 2022 Bohemia Automation"
16
+ copyright = "(c) Bohemia Automation"
17
17
 
18
18
  dir_eva_default = '/opt/eva4'
19
19
 
@@ -173,7 +173,7 @@ def xc(cmd, ps='working', verbose=False):
173
173
  raise RuntimeError(f'process exited with the code {p.returncode}')
174
174
 
175
175
 
176
- def exec_cmd(cmd, args, search_in='bin', search_system=True):
176
+ def exec_cmd(cmd, args, search_in='bin', search_system=True, env=None):
177
177
  check_local_shell()
178
178
  c = f'{common.dir_eva}/{search_in}/{cmd}'
179
179
  if not os.path.isfile(c) and search_system:
@@ -181,7 +181,13 @@ def exec_cmd(cmd, args, search_in='bin', search_system=True):
181
181
  c = shutil.which(cmd)
182
182
  if not c:
183
183
  raise RuntimeError(f'{cmd} not found')
184
- code = os.system(f'{c} {args}')
184
+ if env is None:
185
+ ec = ''
186
+ else:
187
+ ec = ''
188
+ for var, value in env.items():
189
+ ec += f'{var}="{value}" '
190
+ code = os.system(f'{ec}{c} {args}')
185
191
  if code:
186
192
  raise RuntimeError(f'{cmd} failed with code {code}')
187
193
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eva-shell
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: EVA ICS v4 shell
5
5
  Home-page: https://github.com/eva-ics/eva4
6
6
  Author: Bohemia Automation / Altertech
@@ -1,4 +1,4 @@
1
- __version__ = '0.2.3'
1
+ __version__ = '0.2.5'
2
2
 
3
3
  import setuptools
4
4
 
File without changes
File without changes
File without changes
File without changes