提交 aeae6969 编写于 作者: G gzyang

add -v and --version for showing hb version

上级 4e1d58ca
......@@ -40,4 +40,5 @@ CONFIG_STRUCT = {
"product": None,
"product_path": None,
"device_path": None
}
\ No newline at end of file
}
VERSION = '0.3.5'
......@@ -24,6 +24,7 @@ sys.path.insert(0, os.path.abspath(os.path.join(__file__,
import argparse
import importlib
from hb import VERSION
from hb.common.utils import hb_warning
from hb.common.utils import hb_error
......@@ -31,6 +32,10 @@ from hb.common.utils import hb_error
def main():
parser = argparse.ArgumentParser(usage="hb",
description='OHOS build system')
parser.add_argument('-v', '--version',
action='version',
version=f'[OHOS INFO] hb version {VERSION}')
subparsers = parser.add_subparsers()
parser_list = []
parser_list.append({
......
......@@ -19,13 +19,15 @@
import os
from setuptools import setup
from hb import VERSION
WORK_PATH = os.path.abspath(os.path.dirname('__file__'))
README_PATH = os.path.join(WORK_PATH, 'README.md')
LONG_DESCRIPTION = open(README_PATH, 'r', encoding='utf-8').read()
setup(
name='ohos-build',
version='0.3.2',
version=VERSION,
author='Huawei',
author_email='contact@openharmony.io',
description='OHOS build command line tool',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册