aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorkhazhyk <[email protected]>2017-10-12 21:32:26 -0700
committerRapptz <[email protected]>2017-10-14 15:23:32 -0400
commitc3a727ac7ee5e942a4a44b4eec89ba1e789d7cf0 (patch)
treef20dd4110244afb4bea32c375d396cdaca32f472 /setup.py
parentRevert "Implement zlib streaming for the gateway." (diff)
downloaddiscord.py-c3a727ac7ee5e942a4a44b4eec89ba1e789d7cf0.tar.xz
discord.py-c3a727ac7ee5e942a4a44b4eec89ba1e789d7cf0.zip
Show sha1 for development versions.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index b2492143..3441ff27 100644
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,12 @@ if version.endswith(('a', 'b', 'rc')):
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:
- version = version + out.decode('utf-8').strip()
+ version += out.decode('utf-8').strip()
+ p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ if out:
+ version += '-' + out.decode('utf-8').strip()
except Exception:
pass