Skip to content

Commit a418c09

Browse files
authored
Create version.py
1 parent f2062bf commit a418c09

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spanking/version.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import os
2+
3+
4+
def string():
5+
try:
6+
with open(os.path.dirname(__file__) + "/VERSION", "r", encoding="utf-8") as fh:
7+
version = fh.read().strip()
8+
if version:
9+
return version
10+
except:
11+
pass
12+
return "unknown (git checkout)"

0 commit comments

Comments
 (0)