From 776fe12a9afc6e1bf379d0c2144d66957a2fb66c Mon Sep 17 00:00:00 2001 From: Amy He Date: Fri, 6 Sep 2024 10:02:10 -0700 Subject: [PATCH] format version of Non-Tagged Commit if from version.py --- .DS_Store | Bin 0 -> 6148 bytes build/.DS_Store | Bin 0 -> 6148 bytes build/python/setup.py | 8 +++++++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .DS_Store create mode 100644 build/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..24799c958d323006e0f6b85772ef7dc3e0be6db7 GIT binary patch literal 6148 zcmeHKyG{c!5S)b|BGIIz^e^xSrzm^@KLFuUARP)4ij?vyzKc&|_R*Y9h)~dwS!q4? zddH5ZxXl8v^`XB5RsfcCM|}7&H{W-k*+oShEzaos_vc}|-w#}#X3o9B76-gwz=VH| z9gcXyE8e)Z`}NVM{QzZ20VyB_q<|DSGX<(hFK^E5-FmJRkODs|;NOQvckBws#Q1b@ zh!%jjU^tBP=p~5F1H`UyOk{*+NhK!Ls>QIRGu|q%D;yJ(4vU+4PTg$Pp;+9`c#Cvc zm#9$+NP(#Wm$_Vd{lBMw)BjINT1f#Z@UIlG#pYqN=98+n&K~Erw$UHyp7Tj}<2)!F mq8t;W9CP92_%@O24?VS5{ZEnoW^U;$uGcf`97Q}ccIiJeu%(c+8&+kW@3xgUnjB>Qy0xfgiG8(#2; zFMJ+|OYHH4EqZS3vHRiCr!Q1g3P=GdAO)nrKUcs@ENy<3s8I??0V(jQfPWtv-LWei z6XVmtAzA?9jNvfOqn98y4-mV;F_96PC6$;|s}{qO&UmZ5u5e6DIxKGHId!vDhhlL% z<1Nx*U7|)QAO(&UIM3z6>;EnNoBscpq?Htq0)I*Yo2}NXC7)Eab@Di`wT*s9_nZ&9 q8|Ojc5apN{<(LaE$JddRdClkC?+VAnpfetHqJ9Qk7nv0JZ3PYzQXC!t literal 0 HcmV?d00001 diff --git a/build/python/setup.py b/build/python/setup.py index 6d1c6a7..f225351 100644 --- a/build/python/setup.py +++ b/build/python/setup.py @@ -59,7 +59,13 @@ def find_version(): version = f.read().strip() print('Version found: %s (from version.py)' % version) - return version + + git_output = subprocess.check_output(['git', 'describe', '--abbrev=7', '--dirty=@mod', '--always', '--tags']) + git_output = git_output.strip().decode() + + if git_output.startswith('v'): + git_output = git_output[1:] + return f"{git_output}+{version}" try: git_output = subprocess.check_output(['git', 'describe', '--abbrev=7', '--dirty=@mod', '--always', '--tags'])