Skip to content

Commit

Permalink
Extract version from git tags
Browse files Browse the repository at this point in the history
Use `git --always --dirty --tag` to get current version of a project.
This closes #4. From now on, forgeting about version should never become
a problem
  • Loading branch information
v3l0c1r4pt0r committed May 23, 2020
1 parent c5b772d commit f6ab44d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/usr/bin/env python3
from distutils.core import setup
import subprocess

def version():
git_proc = subprocess.Popen(['git', 'describe', '--always', '--dirty', '--tag'], stdout=subprocess.PIPE)
return git_proc.stdout.readlines()[0].decode('utf-8').strip()

setup(
name = 'makeelf',
packages = ['makeelf', 'makeelf.type'],
version = '0.3.3',
version = version(),
description = 'ELF reader-writer library',
url = 'https://github.com/v3l0c1r4pt0r/makeelf',
author = 'v3l0c1r4pt0r',
Expand Down

0 comments on commit f6ab44d

Please sign in to comment.