Merge pull request 'deployimage-rc' (#53) from deployimage-rc into main
ogclient/pipeline/head This commit looks good Details
ogclient/pipeline/tag This commit looks good Details

Reviewed-on: #53
pull/54/head 0.14.1
Natalia Serrano 2025-06-06 13:58:33 +02:00
commit 0a26ebd946
2 changed files with 11 additions and 6 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.14.1] - 2025-06-07
### Fixed
- Fixed rc management in deployImage.py
## [0.14.0] - 2025-06-07
### Changed

View File

@ -140,14 +140,10 @@ def main (repo, imgname, disk, par, proto='UNICAST', protoopt=''):
# Si existe, ejecuta script personalizado "restoreImageCustom"; si no, llama al genérico "restoreImage".
if shutil.which ('restoreImageCustom'):
SystemLib.ogEcho (['log', 'session'], None, f'[55] {ogGlobals.lang.MSG_HELP_ogRestoreImage}: restoreImageCustom {params}')
retval = subprocess.run (['restoreImageCustom'] + params).returncode
retval = not subprocess.run (['restoreImageCustom'] + params).returncode
else:
SystemLib.ogEcho (['log', 'session'], None, f'[55] {ogGlobals.lang.MSG_HELP_ogRestoreImage}: restoreImage {params}')
retval = subprocess.run (['restoreImage.py'] + params).returncode
## turn shell's success into python success (without ending up with True or False)
if retval: retval = 0
else: retval = 1
retval = not subprocess.run (['restoreImage.py'] + params).returncode
# Mostrar resultados.
resumerestoreimage = subprocess.run (['grep', '--max-count', '1', 'Total Time:', ogGlobals.OGLOGCOMMAND], capture_output=True, text=True).stdout
@ -176,6 +172,9 @@ def main (repo, imgname, disk, par, proto='UNICAST', protoopt=''):
# Registro de fin de ejecución
# Si se ha llamado desde ejecutar script no lo muestro para no repetir.
if SystemLib.ogGetCaller() != 'EjecutarScript':
## turn shell's success into python success (without ending up with True or False, because we want to ogEcho() "0"/"1" rather than ogEcho() "True"/"False")
if retval: retval = 0
else: retval = 1
SystemLib.ogEcho (['log', 'session'], None, f'{ogGlobals.lang.MSG_INTERFACE_END} {retval}')
sys.exit (retval)