.github: Make all release tags follow v<semver> convention

Replace xemu-v*, gh-release/* tagging with typical semver vX.Y.Z, which
plays nicer with GitHub releases. Increments patch version on push
to master.
This commit is contained in:
Matt Borgerson
2022-04-29 21:47:17 -07:00
committed by mborgerson
parent 292c9703de
commit a809d8557d
5 changed files with 42 additions and 18 deletions

10
scripts/increment-semver.py Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env python3
import argparse, re
ap = argparse.ArgumentParser()
ap.add_argument('semver', help='Input semver X.Y.Z')
args = ap.parse_args()
m = re.match(r'(?P<pfx>[^\d]*)(?P<maj>\d+)\.(?P<min>\d+)\.(?P<pat>\d+)',
args.semver)
assert m, 'Invalid version format'
print(m.group('pfx') + '.'.join([m.group('maj'), m.group('min'),
str(int(m.group('pat')) + 1)]))