comparison tests/test-check-tag.t @ 5653:479f76c47295 stable

tests: add a new test-check-tag.t to test releases
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 12 Nov 2020 13:37:35 +0800
parents
children 279c01842eca
comparison
equal deleted inserted replaced
5652:ccde78088d0b 5653:479f76c47295
1 #require test-repo
2
3 Enable obsolescence to avoid the warning issue when obsmarkers are found
4
5 $ cat << EOF >> $HGRCPATH
6 > [experimental]
7 > evolution = all
8 > EOF
9
10 $ cd "$TESTDIR"/..
11
12 Checking all non-public tagged revisions up to the current commit, see our
13 release checklist for more ideas
14
15 $ for node in `hg log --rev 'tag() and ::. and not public() and not desc("# no-check-commit")' --template '{node|short}\n'`; do
16 > tags=`hg log --rev $node --template '{tags}\n'`
17 > if echo "$tags" | grep -q ' '; then
18 > echo "Revision $node is tagged multiple times: $tags"
19 > fi
20 > branch=`hg log --rev $node --template '{branch}\n'`
21 > if [ "$branch" != "stable" ]; then
22 > echo "Revision $node is not on stable branch: $branch"
23 > fi
24 > # Here we skip:
25 > # - pullbundle because it usually has no changes (so no version bump)
26 > # - serverminitopic because it's not actively maintained
27 > if hg grep --rev $node '^__version__ = .*\.dev' hgext3rd/evolve/ hgext3rd/topic/; then
28 > echo "Versions should not end with .dev at tagged revision $node"
29 > fi
30 > entry=`hg cat --rev $node CHANGELOG | fgrep "$tags"`
31 > if [ -z "$entry" ]; then
32 > echo "Revision $node has no CHANGELOG entry for $tags"
33 > fi
34 > if echo "$entry" | egrep -vq ' -- [0-9]{4}-[0-9]{2}-[0-9]{2}'; then
35 > echo "CHANGELOG entry for $tags should have a date in YYYY-MM-DD format: $entry"
36 > fi
37 > entry=`hg cat --rev $node debian/changelog | fgrep "$tags"`
38 > if [ -z "$entry" ]; then
39 > echo "Revision $node has no debian/changelog entry for $tags"
40 > fi
41 > done