Skip to content

Commit 5487482

Browse files
committed
Merge branch 'feature/versioning' into bugfix/issue_46
2 parents 801f0f3 + f1a0913 commit 5487482

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

dyndns/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__="0.0.9"

dyndns/command_line.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
from dyndns import domain_update
88
from dyndns import domain_status
99
from dyndns import domain_remove
10+
from . import __version__
1011

1112

1213
def main():
1314
parser = argparse.ArgumentParser(description="Config domain for DynDNS")
1415

1516
parser.add_argument('action', choices=['setup', 'update', 'status', 'remove'], help="action to be performed on "
1617
"domain(s)")
18+
parser.add_argument('--version', action='version', version='%(prog)s {version}'.format(version=__version__))
1719
parser.add_argument('--config', type=str, default='settings.txt', help="config file path")
1820
parser.add_argument('--backup_file', default=None, help="backup file path for remove domain")
1921
parser.add_argument('--ignore-previous-ip', action='store_true', dest='ignore_previous_ip',
@@ -35,6 +37,8 @@ def main():
3537
ignore_ipv4 = "ipv4" not in args.protocols
3638
ignore_ipv6 = "ipv6" not in args.protocols
3739

40+
print('*** {} {} ***\n'.format(parser.prog, __version__))
41+
3842
# validate domain
3943
if domain and not validators.domain(domain) is True:
4044
print("Domain is not valid.")

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22
from setuptools import setup
3+
import dyndns
34

45
with open("README.md", "r") as fh:
56
long_description = fh.read()
@@ -10,7 +11,7 @@
1011

1112
setup(
1213
name = 'domain-connect-dyndns',
13-
version = '0.0.8',
14+
version=dyndns.__version__,
1415
description = 'Python client library for Dynamic DNS using Domain Connect',
1516
license = 'MIT',
1617
long_description=long_description,

0 commit comments

Comments
 (0)