Skip to content

Commit

Permalink
Remove version file
Browse files Browse the repository at this point in the history
  • Loading branch information
john-westcott-iv committed Jan 31, 2024
1 parent 3cb9379 commit 6b9645a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ pre-commit-user
# Make target touch files
.docker-compose-built

# Ignore the build version file
ansible_base/_version.py

# Python & setuptools
__pycache__
/build
Expand Down
18 changes: 0 additions & 18 deletions ansible_base/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
try:
from ._version import __version__, __version_tuple__ # noqa: F401
except Exception:
import datetime
import subprocess
from typing import Tuple, Union

calver_now = datetime.datetime.now().strftime("%Y.%m.%d")
shaw = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()

VERSION_TUPLE = Tuple[Union[int, str], ...]

__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = f'{calver_now}-{shaw}'
__version_tuple__ = version_tuple = tuple(__version__.split('.'))
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ build-backend = 'setuptools.build_meta'

[tool.setuptools_scm]
version_scheme = "calver-by-date"
version_file = 'ansible_base/_version.py'
local_scheme = 'no-local-version'

[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion tools/ansible/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
connection: local
gather_facts: true
vars:
repo_identifier: "ansible/django-ansible-base"
repo_identifier: "john-westcott-iv/django-ansible-base"
api_repo_prefix: "https://api.github.com/repos/{{ repo_identifier }}"

# Note:
Expand Down

0 comments on commit 6b9645a

Please sign in to comment.