From df941a3db45b24cfac162daceb646ea3880f69c8 Mon Sep 17 00:00:00 2001 From: iamWHTWD <28421344+iamWHTWD@users.noreply.github.com> Date: Wed, 24 Aug 2022 15:46:11 +0800 Subject: [PATCH] Update setup.py (#1391) --- setup.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 834f1d67..3822bef4 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,17 @@ import platform from setuptools import find_packages from setuptools import setup -slim_version = "2.3.3" +if 'develop' in subprocess.getoutput('git branch'): + slim_version = '0.0.0_dev' +else: + tag_list = subprocess.getoutput('git tag').split('\n') + if 'rc' in tag_list[-1]: + if tag_list[-1].split('-')[0] == tag_list[-2]: + slim_version = tag_list[-2] + else: + slim_version = tag_list[-1] + else: + slim_version = tag_list[-1] with open('./requirements.txt') as f: setup_requires = f.read().splitlines() -- GitLab