Skip to content
Snippets Groups Projects
Commit b9834871 authored by Nicola Sparnacci's avatar Nicola Sparnacci
Browse files

[VERSION] Add --version option returning tool's version


Signed-off-by: default avatarNicola Sparnacci <nicola.sparnacci@seco.com>
parent 067f1e3d
No related branches found
No related tags found
1 merge request!31[VERSION] Add --version option returning tool's version
Pipeline #207262 passed with warnings with stages
in 27 seconds
......@@ -9,6 +9,7 @@ import seco_setup_utils as ssu
import seco_setup_environment as sse
import seco_setup_conf as ssc
import seco_setup_post_scripts as ssp
from version import __version__
# -------------------------------- LOGGER ----------------------------------- #
logger = ssu.setup_logging(os.path.basename(os.path.abspath(__file__)), logging.DEBUG)
......@@ -26,6 +27,7 @@ parser.add_argument("-p", "--get_config_path", action='store_true', help="Return
parser.add_argument('-a', "--add_custom_layer", type=str, help="Add an extra layer to default setting.")
parser.add_argument('-v', '--verbose', action='store_true', help="Enable verbose output")
parser.add_argument('--post-scripts', action='store_true', help="Run post-scripts for HW and flavours")
parser.add_argument('--version', action='store_true', help="Returns configurator core version")
# Add options for environment handling
parser.add_argument("-e", "--environment", action='store_true', help="Handle the creation of the build environment.")
......@@ -97,6 +99,12 @@ def main():
#####################################################################
if args.post_scripts:
ssp.post_scripts_manager(args.build_dir)
#####################################################################
# --version #
#####################################################################
if args.version:
ssu.eprint(f"Configurator core version: {__version__}.\n")
return 0
except:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment