Skip to content

Commit

Permalink
fix: 生成changelog时未获取到正确的tag
Browse files Browse the repository at this point in the history
  • Loading branch information
lerdb committed Oct 9, 2024
1 parent 94778ab commit a177ebb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@


def get_latest_tag():
t = subprocess.check_output(['git', 'tag']).decode('utf-8').strip().split("\n")
t = subprocess.check_output(['git', 'tag', '--sort=v:refname']).decode('utf-8').strip().split("\n")
return t[-1] if (t[-1] != toml.load("./pyproject.toml")["tool"]["poetry"]["version"]) else t[-2]

def get_specified_tag(index):
r = subprocess.check_output(['git', 'tag']).decode('utf-8').strip().split("\n")
r = subprocess.check_output(['git', 'tag', '--sort=v:refname']).decode('utf-8').strip().split("\n")
n = []
for i in r:
if (i):
Expand Down

0 comments on commit a177ebb

Please sign in to comment.