diff --git a/octodns_selectel/__init__.py b/octodns_selectel/__init__.py index 7265c2b..fd16dec 100644 --- a/octodns_selectel/__init__.py +++ b/octodns_selectel/__init__.py @@ -1,4 +1,9 @@ from .v1.provider import SelectelProvider as SelectelProviderLegacy from .v2.provider import SelectelProvider as SelectelProvider +from .version import __VERSION__, __version__ __all__ = [SelectelProviderLegacy, SelectelProvider] + +# quell warnings +__VERSION__ +__version__ diff --git a/octodns_selectel/v1/provider.py b/octodns_selectel/v1/provider.py index 24fb0f1..6264c4f 100644 --- a/octodns_selectel/v1/provider.py +++ b/octodns_selectel/v1/provider.py @@ -4,12 +4,12 @@ from requests import Session from requests.exceptions import HTTPError -from octodns import __VERSION__ as octodns_version +from octodns import __version__ as octodns_version from octodns.provider import ProviderException from octodns.provider.base import BaseProvider from octodns.record import Record, Update -from octodns_selectel.version import version as provider_version +from octodns_selectel.version import __version__ as provider_version def require_root_domain(fqdn): diff --git a/octodns_selectel/v2/dns_client.py b/octodns_selectel/v2/dns_client.py index b7e193e..f99ae69 100644 --- a/octodns_selectel/v2/dns_client.py +++ b/octodns_selectel/v2/dns_client.py @@ -1,6 +1,6 @@ from requests import Session -from octodns import __VERSION__ as octodns_version +from octodns import __version__ as octodns_version from .exceptions import ApiException diff --git a/octodns_selectel/v2/provider.py b/octodns_selectel/v2/provider.py index 6429c62..9be61c7 100644 --- a/octodns_selectel/v2/provider.py +++ b/octodns_selectel/v2/provider.py @@ -8,7 +8,7 @@ from octodns.provider.base import BaseProvider from octodns.record import Record, SshfpRecord, Update -from octodns_selectel.version import version as provider_version +from octodns_selectel.version import __version__ as provider_version from .dns_client import DNSClient from .exceptions import ApiException diff --git a/octodns_selectel/version.py b/octodns_selectel/version.py index 2d430d1..50813cc 100644 --- a/octodns_selectel/version.py +++ b/octodns_selectel/version.py @@ -1 +1,2 @@ -version = '0.0.4' +# TODO: remove __VERSION__ w/2.x +__version__ = __VERSION__ = '0.99.0' diff --git a/script/release b/script/release index 6202a66..28e7cab 100755 --- a/script/release +++ b/script/release @@ -33,7 +33,7 @@ fi # Set so that setup.py will create a public release style version number export OCTODNS_RELEASE=1 -VERSION="$(grep "^version" "$ROOT/octodns_selectel/version.py" | sed -e "s/.* = '//" -e "s/'$//")" +VERSION="$(grep "^__version__" "$ROOT/octodns_selectel/version.py" | sed -e "s/.* = '//" -e "s/'$//")" git tag -s "v$VERSION" -m "Release $VERSION" git push origin "v$VERSION" diff --git a/setup.py b/setup.py index 635a9a4..bc29c96 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def descriptions(): def version(): with open('octodns_selectel/version.py') as fh: for line in fh: - if line.startswith('version'): + if line.startswith('__version__'): return line.split("'")[1] return 'unknown'