From 6d798d807b7e13815399005f532ff6cb33b94c27 Mon Sep 17 00:00:00 2001 From: helloplhm-qwq Date: Wed, 31 Jan 2024 23:11:39 +0800 Subject: [PATCH] =?UTF-8?q?build:=20[release]=20=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 6f654f6..b433b51 100644 --- a/build.py +++ b/build.py @@ -6,7 +6,8 @@ import os def get_latest_tag(): - return subprocess.check_output(['git', 'describe', '--abbrev=0', '--tags']).decode('utf-8').strip() + t = subprocess.check_output(['git', 'tag']).decode('utf-8').strip().split("\n") + return t[-1] if (t[-1] != toml.load("./pyproject.toml")["tool"]["poetry"]["version"]) else t[-2] def get_changelog():