Merge branch 'release_check' into 'master'

CI: Test that any bump to changelog has a corresponding tag

See merge request Librem5/squeekboard!337
This commit is contained in:
Dorota Czaplejewicz
2020-03-07 10:33:53 +00:00
2 changed files with 20 additions and 0 deletions

View File

@ -84,3 +84,13 @@ test:
script:
- apt-get -y build-dep .
- ninja -C _build test
check_release:
<<: *tags
stage: test
only:
refs:
- master
script:
- apt-get install git python3
- (head -n 1 ./debian/changelog && git tag) | ./debian/check_release.py

10
debian/check_release.py vendored Executable file
View File

@ -0,0 +1,10 @@
#!/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!")