Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH 3/3] mkrelease: add a --runtests shortcut
Date: Sun, 05 Jan 2014 15:50:52
Message-Id: 1388937034-22930-3-git-send-email-vapier@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 1/3] runtests: add a "supported" shortcut by Mike Frysinger
1 This automates the release+test cycle a bit so people don't have to do
2 it all by hand.
3 ---
4 DEVELOPING | 7 ++-----
5 mkrelease.sh | 15 +++++++++++++--
6 2 files changed, 15 insertions(+), 7 deletions(-)
7
8 diff --git a/DEVELOPING b/DEVELOPING
9 index 7aac81b..b704a50 100644
10 --- a/DEVELOPING
11 +++ b/DEVELOPING
12 @@ -167,11 +167,8 @@ Releases
13 First create a git tag for this release:
14 git tag v2.2.8
15
16 -Then create the tarball:
17 - ./mkrelease.sh --changelog-rev v2.2.7 --tag 2.2.8
18 -
19 -Unpack the tarball and run tests:
20 - ./runtests.sh --python-versions=supported
21 +Then create the tarball and run the tests:
22 + ./mkrelease.sh --changelog-rev v2.2.7 --tag --runtests 2.2.8
23 Make sure you have all supported python versions installed first
24 (see PYTHON_SUPPORTED_VERSIONS in runtests.sh).
25
26 diff --git a/mkrelease.sh b/mkrelease.sh
27 index 50bdb3c..334b4fb 100755
28 --- a/mkrelease.sh
29 +++ b/mkrelease.sh
30 @@ -8,9 +8,10 @@ BRANCH=${BRANCH:-master}
31 USE_TAG=false
32 CHANGELOG_REVISION=
33 UPLOAD_LOCATION=
34 +RUNTESTS=false
35
36 usage() {
37 - echo "Usage: ${0##*/} [--changelog-rev <tree-ish>] [-t|--tag] [-u|--upload <location>] <version>"
38 + echo "Usage: ${0##*/} [--changelog-rev <tree-ish>] [-t|--tag] [-u|--upload <location>] [--runtests] <version>"
39 exit ${1:-0}
40 }
41
42 @@ -19,7 +20,7 @@ die() {
43 usage 1
44 }
45
46 -ARGS=$(getopt -o htu: --long help,changelog-rev:,tag,upload: \
47 +ARGS=$(getopt -o htu: --long help,changelog-rev:,runtests,tag,upload: \
48 -n "${0##*/}" -- "$@")
49 [ $? != 0 ] && die "initialization error"
50
51 @@ -42,6 +43,10 @@ while true; do
52 -h|--help)
53 usage
54 ;;
55 + --runtests)
56 + RUNTESTS=true
57 + shift
58 + ;;
59 --)
60 shift
61 break
62 @@ -78,6 +83,12 @@ cp -a "${SOURCE_DIR}/"{bin,cnf,doc,man,misc,pym} "${RELEASE_DIR}/" || die "direc
63 cp "${SOURCE_DIR}/"{DEVELOPING,LICENSE,Makefile,NEWS,README,RELEASE-NOTES,TEST-NOTES} \
64 "${RELEASE_DIR}/" || die "file copy failed"
65
66 +if [[ ${RUNTESTS} == "true" ]] ; then
67 + pushd "${SOURCE_DIR}" >/dev/null
68 + ./runtests.sh --python-versions=supported || die "tests failed"
69 + popd >/dev/null
70 +fi
71 +
72 rm -rf "${SOURCE_DIR}" || die "directory cleanup failed"
73
74 echo ">>> Setting portage.VERSION"
75 --
76 1.8.4.3

Replies