1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Remove stale script/sdist script

This commit is contained in:
Ross McFarland
2023-11-12 15:45:43 -08:00
parent eb4979d40b
commit 344bc2de5f
5 changed files with 11 additions and 23 deletions

View File

@@ -10,7 +10,7 @@ from sys import stderr, stdout
from yaml import safe_load
from octodns import __VERSION__
from octodns import __version__
class ArgumentParser(_Base):
@@ -24,7 +24,7 @@ class ArgumentParser(_Base):
super().__init__(*args, **kwargs)
def parse_args(self, default_log_level=INFO):
version = f'octoDNS {__VERSION__}'
version = f'octoDNS {__version__}'
self.add_argument(
'--version',
action='version',

View File

@@ -11,7 +11,7 @@ from logging import getLogger
from os import environ
from sys import stdout
from . import __VERSION__
from . import __version__
from .idna import IdnaDict, idna_decode, idna_encode
from .processor.arpa import AutoArpa
from .processor.meta import MetaProcessor
@@ -89,7 +89,7 @@ class Manager(object):
def __init__(
self, config_file, max_workers=None, include_meta=False, auto_arpa=False
):
version = self._try_version('octodns', version=__VERSION__)
version = self._try_version('octodns', version=__version__)
self.log.info(
'__init__: config_file=%s, (octoDNS %s)', config_file, version
)
@@ -308,7 +308,10 @@ class Manager(object):
# finally try and import the module and see if it has a __VERSION__
if module is None:
module = import_module(module_name)
return getattr(module, '__VERSION__', None)
# TODO: remove the __VERSION__ fallback eventually?
return getattr(
module, '__version__', getattr(module, '__VERSION__', None)
)
def _import_module(self, module_name):
current = module_name

View File

@@ -6,7 +6,7 @@ from datetime import datetime
from logging import getLogger
from uuid import uuid4
from .. import __VERSION__
from .. import __version__
from ..record import Record
from .base import BaseProcessor
@@ -91,7 +91,7 @@ class MetaProcessor(BaseProcessor):
uuid = self.uuid() if include_uuid else None
values.append(f'uuid={uuid}')
if include_version:
values.append(f'octodns-version={__VERSION__}')
values.append(f'octodns-version={__version__}')
self.include_provider = include_provider
values.sort()
self.values = values

View File

@@ -2,6 +2,6 @@
set -e
VERSION=v$(grep __VERSION__ octodns/__init__.py | sed -e "s/^[^']*'//" -e "s/'$//")
VERSION=v$(grep __version__ octodns/__init__.py | sed -e "s/^[^']*'//" -e "s/'$//")
echo $VERSION
git log --pretty="%h - %cr - %s (%an)" "${VERSION}..HEAD"

View File

@@ -1,15 +0,0 @@
#!/bin/bash
set -e
if ! git diff-index --quiet HEAD --; then
echo "Changes in local directory, commit or clear" >&2
exit 1
fi
SHA=$(git rev-parse HEAD)
python setup.py sdist
TARBALL="dist/octodns-$SHA.tar.gz"
mv dist/octodns-0.*.tar.gz "$TARBALL"
echo "Created $TARBALL"