Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #588 from locriandev/ART-3981-improve-version-hand…
Browse files Browse the repository at this point in the history
…ling-for-elliott-and-doozer

[ART-3981] Improve version handling for Doozer
  • Loading branch information
locriandev committed Apr 22, 2022
2 parents 405d562 + b33359f commit 52a7aef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
1 change: 0 additions & 1 deletion doozerlib/VERSION

This file was deleted.

8 changes: 4 additions & 4 deletions doozerlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import sys
if sys.version_info < (3, 6):
sys.exit('Sorry, Python < 3.6 is not supported.')
import io

from setuptools_scm import get_version

from .runtime import Runtime
from .pushd import Dir


def version():
from os.path import abspath, dirname, join
filename = join(dirname(abspath(__file__)), 'VERSION')
return io.open(filename, encoding="utf-8").read().strip()
return get_version()
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ wrapt
mysql-connector-python~=8.0.21
python-dateutil~=2.8.1
openshift-client~=1.0.12
setuptools-scm
9 changes: 2 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
INSTALL_REQUIRES = f.read().splitlines()


def _get_version():
from os.path import abspath, dirname, join
filename = join(dirname(abspath(__file__)), 'doozerlib', 'VERSION')
return open(filename).read().strip()


setup(
name="rh-doozer",
author="AOS ART Team",
author_email="aos-team-art@redhat.com",
version=_get_version(),
use_scm_version=True,
setup_requires=['setuptools_scm'],
description="CLI tool for managing and automating Red Hat software releases",
long_description=open('README.md').read(),
url="https://github.com/openshift/doozer",
Expand Down

0 comments on commit 52a7aef

Please sign in to comment.