We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e8892f commit 56019dfCopy full SHA for 56019df
build.py
@@ -15,8 +15,27 @@
15
16
import requests
17
18
+
19
+def get_current_version():
20
+ path = os.getcwd()
21
+ procs = subprocess.run(
22
+ [
23
+ "git",
24
+ "describe",
25
+ "--tags",
26
+ "--exact-match",
27
+ ],
28
+ stdout=subprocess.PIPE,
29
+ stderr=subprocess.PIPE,
30
+ cwd=path,
31
+ )
32
+ if procs.returncode != 0:
33
+ return None
34
+ return procs.stdout.decode("utf8").strip()
35
36
37
# the date tag for the generated files and stuff
-TAG = datetime.date.today().strftime("%Y%m%d")
38
+TAG = get_current_version() or datetime.date.today().strftime("%Y%m%d")
39
# the dirs for putting the things in it
40
BUILD_DIR = "_build"
41
BUILD_DEPS = os.path.join(BUILD_DIR, "deps")
0 commit comments