Skip to content

Commit c63a644

Browse files
committed
* new version v1.0.17
* add --version script parameter * show version string on make package test
1 parent e614751 commit c63a644

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

klyqa_ctl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
###################################################################
1313

14-
__version__ = "1.0.14"
14+
__version__ = "1.0.17"
1515
__author__ = "Frederick Stallmeyer <fraizy@gmx.de>"
1616
__license__ = "MIT"
1717

klyqa_ctl/general/general.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545

4646

4747
SEND_LOOP_MAX_SLEEP_TIME = 0.05
48+
KLYQA_CTL_VERSION="1.0.17"
4849

4950
DeviceType = Enum("DeviceType", "cleaner lighting")
5051

klyqa_ctl/general/parameters.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ def add_config_args(parser: argparse.ArgumentParser) -> None:
4747
nargs=1,
4848
help="timeout in seconds for the response of the devices",
4949
)
50+
parser.add_argument(
51+
"--version",
52+
action="store_const",
53+
const=True,
54+
default=False,
55+
help="print klyqa-ctl module version",
56+
)
5057
parser.add_argument(
5158
"--device_name",
5259
nargs=1,

klyqa_ctl/klyqa_ctl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,10 @@ def main():
20782078
sys.exit(1)
20792079

20802080
args_parsed = parser.parse_args(args=args_in)
2081+
2082+
if args_parsed.version:
2083+
print(KLYQA_CTL_VERSION)
2084+
sys.exit(0)
20812085

20822086
if not args_parsed:
20832087
sys.exit(1)

make_package.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ source ./bin/activate
2020
echo "install klyqa ctl package ..."
2121
python3.9 -m pip install $target
2222
echo "test klyqa ctl package module ..."
23-
python3.9 -m klyqa_ctl --help
23+
python3.9 -m klyqa_ctl lighting --version
2424
echo "is working ..."
2525
)
2626

0 commit comments

Comments
 (0)