Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yazdipour authored Jul 3, 2023
1 parent 9164b4b commit 96e0c81
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
from setuptools import setup, find_packages
import subprocess

def get_latest_git_tag():
try:
version = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"])
version = version.strip().decode("utf-8") # Remove trailing newline and decode bytes to string

# Remove the 'v' from the tag
if version.startswith('v'):
version = version[1:]

return version
except Exception as e:
print(f"An exception occurred while getting the latest git tag: {e}")
return None

VERSION = get_latest_git_tag() or "0.0.1" # Fallback version

VERSION = "0.2.3.2"
PROJECT_URLS = {
"Bug Tracker": "https://github.com/yazdipour/OmnivoreQL/issues",
"Source Code": "https://github.com/yazdipour/OmnivoreQL",

0 comments on commit 96e0c81

Please sign in to comment.