From 7370e98bf703b9f3c1e5570ac93a42e75b8f8aca Mon Sep 17 00:00:00 2001 From: karltk Date: Wed, 10 Nov 2004 16:16:16 +0000 Subject: [PATCH] New release svn path=/; revision=170 --- trunk/ChangeLog | 7 ++++ trunk/release.sh | 68 +++++++++++++++++++++++++++++++++++ trunk/src/echangelog/Makefile | 2 +- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100755 trunk/release.sh diff --git a/trunk/ChangeLog b/trunk/ChangeLog index ad0e279..777d822 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,10 @@ +2004-10-20 Karl Trygve Kalleberg + * release.sh: New script that automates the relase of a new + gentoolkit relase. Only works for gentoolkit-dev at the + moment. + * src/echangelog/Makefile: Fixed spurious '}' + * Released gentoolkit-dev-0.2.1 + 2004-10-31 Marius Mauch * qpkg: security fix for bug #68846 diff --git a/trunk/release.sh b/trunk/release.sh new file mode 100755 index 0000000..53b3dac --- /dev/null +++ b/trunk/release.sh @@ -0,0 +1,68 @@ +#! /bin/bash + +if [ "$(whoami)" == "karltk" ] ; then + publish_path=dev.gentoo.org:public_html/projects/gentoolkit/releases + publish_public_path="http://dev.gentoo.org/~karltk/projects/gentoolkit/releases" + portdir=/home/karltk/source/oss/gentoo/gentoo-x86/ + export ECHANGELOG_USER="Karl Trygve Kalleberg " +else + echo "!!! Don't know who $(whoami) is, can't release" + exit 1 +fi + + +function most-recent-ebuild() { + # FIXME: actually pick the most recent one + ls gentoolkit-dev-*.ebuild | tail -n 1 +} + +function release-dev() { + + echo "* Building .tar.bz" + make VERSION=${VERSION} RELEASE_TAG=${RELEASE_TAG} dist-gentoolkit-dev > /dev/null || exit + + echo "* Uploading .tar.bz" + scp release/gentoolkit-dev-${VERSION}${RELEASE_TAG}.tar.gz ${publish_path} || exit + + + echo "* Generating new ebuild" + + local finalebuild="gentoolkit-dev-${VERSION}${RELEASE_TAG}.ebuild" + + cd ${portdir}/app-portage/gentoolkit-dev || exit + ebuild=$(most-recent-ebuild) + cat ${ebuild} | sed \ + -e 's/KEYWORDS=.*/KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390 ~ppc-macos"/' \ + -e "s|SRC_URI=.*|SRC_URI=\"${publish_public_path}/\$\{\P\}.tar.gz\"|" \ + > ${finalebuild} || exit + + echo "* Generating digest" + ebuild ${finalebuild} digest || exit + cvs add ${finalebuild} || exit + echangelog "New upstream release." + echo '* Everything ready. You should:' + echo ' 1) ACCEPT_KEYWORDS="~x86" sudo emerge =gentoolkit-dev-${VERSION}${RELEASE_TAG}' + echo ' 2) repoman ci -m "New upstraem release." from `pwd`' +} + + +if [ -z "${VERSION}" ] ; then + echo "!!! You must set the VERSION env var" + exit 1 +fi + +if [ -z "${RELEASE_TAG}" ] ; then + echo "No RELEASE_TAG found, presumably okay" +fi + + +if [ "$1" == "dev" ] ; then + release-dev +elif [ "$1" == "main" ] ; then + echo "!!! Unsupported atm, feel free to add code;)" + exit 1 +else + echo "!!! You must select to release either 'dev' or 'main', as parameter to release.sh" + exit 1 +fi + diff --git a/trunk/src/echangelog/Makefile b/trunk/src/echangelog/Makefile index 19dd85d..61c5e57 100644 --- a/trunk/src/echangelog/Makefile +++ b/trunk/src/echangelog/Makefile @@ -14,7 +14,7 @@ all: echangelog.1 dist: echangelog.1 mkdir -p ../../$(distdir)/src/echangelog/ - cp Makefile AUTHORS README TODO ChangeLog echangelog echangelog.pod echangelog.1} ../../$(distdir)/src/echangelog/ + cp Makefile AUTHORS README TODO ChangeLog echangelog echangelog.pod echangelog.1 ../../$(distdir)/src/echangelog/ install: all install -m 0755 echangelog $(bindir)/ -- 2.26.2