From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 50273138247 for ; Sun, 5 Jan 2014 15:50:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A7850E0AC5; Sun, 5 Jan 2014 15:50:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A536E0A8A for ; Sun, 5 Jan 2014 15:50:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 25B8233F69C for ; Sun, 5 Jan 2014 15:50:35 +0000 (UTC) From: Mike Frysinger To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] [PATCH 3/3] mkrelease: add a --runtests shortcut Date: Sun, 5 Jan 2014 10:50:34 -0500 Message-Id: <1388937034-22930-3-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1388937034-22930-1-git-send-email-vapier@gentoo.org> References: <1388935543-32017-1-git-send-email-vapier@gentoo.org> <1388937034-22930-1-git-send-email-vapier@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: ce9e0da0-5850-48bf-8632-029d87335f78 X-Archives-Hash: 76726a0456233c821de758b8e5a3b1a7 This automates the release+test cycle a bit so people don't have to do it all by hand. --- DEVELOPING | 7 ++----- mkrelease.sh | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/DEVELOPING b/DEVELOPING index 7aac81b..b704a50 100644 --- a/DEVELOPING +++ b/DEVELOPING @@ -167,11 +167,8 @@ Releases First create a git tag for this release: git tag v2.2.8 -Then create the tarball: - ./mkrelease.sh --changelog-rev v2.2.7 --tag 2.2.8 - -Unpack the tarball and run tests: - ./runtests.sh --python-versions=supported +Then create the tarball and run the tests: + ./mkrelease.sh --changelog-rev v2.2.7 --tag --runtests 2.2.8 Make sure you have all supported python versions installed first (see PYTHON_SUPPORTED_VERSIONS in runtests.sh). diff --git a/mkrelease.sh b/mkrelease.sh index 50bdb3c..334b4fb 100755 --- a/mkrelease.sh +++ b/mkrelease.sh @@ -8,9 +8,10 @@ BRANCH=${BRANCH:-master} USE_TAG=false CHANGELOG_REVISION= UPLOAD_LOCATION= +RUNTESTS=false usage() { - echo "Usage: ${0##*/} [--changelog-rev ] [-t|--tag] [-u|--upload ] " + echo "Usage: ${0##*/} [--changelog-rev ] [-t|--tag] [-u|--upload ] [--runtests] " exit ${1:-0} } @@ -19,7 +20,7 @@ die() { usage 1 } -ARGS=$(getopt -o htu: --long help,changelog-rev:,tag,upload: \ +ARGS=$(getopt -o htu: --long help,changelog-rev:,runtests,tag,upload: \ -n "${0##*/}" -- "$@") [ $? != 0 ] && die "initialization error" @@ -42,6 +43,10 @@ while true; do -h|--help) usage ;; + --runtests) + RUNTESTS=true + shift + ;; --) shift break @@ -78,6 +83,12 @@ cp -a "${SOURCE_DIR}/"{bin,cnf,doc,man,misc,pym} "${RELEASE_DIR}/" || die "direc cp "${SOURCE_DIR}/"{DEVELOPING,LICENSE,Makefile,NEWS,README,RELEASE-NOTES,TEST-NOTES} \ "${RELEASE_DIR}/" || die "file copy failed" +if [[ ${RUNTESTS} == "true" ]] ; then + pushd "${SOURCE_DIR}" >/dev/null + ./runtests.sh --python-versions=supported || die "tests failed" + popd >/dev/null +fi + rm -rf "${SOURCE_DIR}" || die "directory cleanup failed" echo ">>> Setting portage.VERSION" -- 1.8.4.3