diff --git a/octodns_gandi/__init__.py b/octodns_gandi/__init__.py index 8de51de..9d71441 100644 --- a/octodns_gandi/__init__.py +++ b/octodns_gandi/__init__.py @@ -12,7 +12,8 @@ from octodns.provider.base import BaseProvider from octodns.record import Record -__VERSION__ = '0.0.2' +# TODO: remove __VERSION__ with the next major version release +__version__ = __VERSION__ = '0.0.2' class GandiClientException(ProviderException): diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 5de3234..97401e5 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ -from os import environ -from subprocess import CalledProcessError, check_output +#!/usr/bin/env python from setuptools import find_packages, setup @@ -12,23 +11,11 @@ def descriptions(): def version(): - version = 'unknown' with open('octodns_gandi/__init__.py') as fh: for line in fh: - if line.startswith('__VERSION__'): - version = line.split("'")[1] - break - - # pep440 style public & local version numbers - if environ.get('OCTODNS_RELEASE', False): - # public - return version - try: - sha = check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8')[:8] - except (CalledProcessError, FileNotFoundError): - sha = 'unknown' - # local - return f'{version}+{sha}' + if line.startswith('__version__'): + return line.split("'")[1] + return 'unknown' description, long_description = descriptions()