Skip to content

Commit

Permalink
update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkLightTuna committed Dec 15, 2023
1 parent 498fbdf commit cc014f9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@
)
def run_release(release):
subprocess.run('git pull', shell=True)
major, minor, revision = [int(i) for i in subprocess.run(
'git describe --abbrev=0 --tags',
capture_output=True, shell=True, text=True
).stdout.strip('\n').split('.')]
major, minor, revision = max(
[
[int(v) for v in t.split('.')]
for t in
subprocess.run('git tag -l', capture_output=True, shell=True, text=True).stdout.strip('\n').split('\n')
if t != 'latest'
],
key=lambda triple: (triple[0], triple[1], triple[2])
)

match release:
case 'major':
major += 1
Expand Down

0 comments on commit cc014f9

Please sign in to comment.