File: check_release.py

package info (click to toggle)
squeekboard 1.43.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,284 kB
  • sloc: ansic: 2,730; xml: 1,247; python: 296; sh: 48; makefile: 10
file content (11 lines) | stat: -rwxr-xr-x 389 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python3

"""Checks tag before release.
Feed it the first changelog line, and then all available tags.
"""

import re, sys
version = re.findall("\\((.*)\\)", input())[0]
tag = 'v' + re.findall("([0-9]+\\.[0-9]+\\.[0-9]+).*", version)[0]
if tag not in map(str.strip, sys.stdin.readlines()):
    raise Exception("Changelog's current version doesn't have a tag. Push the tag!")