Files
squeekboard/debian/check_release.py
Dorota Czaplejewicz 9f6fe8318c CI: Test that any bump to changelog has a corresponding tag
Prevents forgetting to sign the tag, which is currently done out of band and independently of review.
2020-02-28 12:14:18 +00:00

11 lines
324 B
Python
Executable File

#!/usr/bin/env python3
"""Checks tag before release.
Feed it the first changelog line, and then all available tags.
"""
import re, sys
tag = "v" + re.findall("\\((.*)\\)", input())[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!")