New release
authorkarltk <karltk@gentoo.org>
Wed, 10 Nov 2004 16:16:16 +0000 (16:16 -0000)
committerkarltk <karltk@gentoo.org>
Wed, 10 Nov 2004 16:16:16 +0000 (16:16 -0000)
svn path=/; revision=170

trunk/ChangeLog
trunk/release.sh [new file with mode: 0755]
trunk/src/echangelog/Makefile

index ad0e27965f66aed3564a2dc5df33924cfa96a92f..777d822b8487cf7be854f5864b3ff839fe82727f 100644 (file)
@@ -1,3 +1,10 @@
+2004-10-20 Karl Trygve Kalleberg <karltk@gentoo.org>
+       * 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 <genone@gentoo.org>
        * qpkg: security fix for bug #68846
 
diff --git a/trunk/release.sh b/trunk/release.sh
new file mode 100755 (executable)
index 0000000..53b3dac
--- /dev/null
@@ -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 <karltk@gentoo.org>"
+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
+
index 19dd85d8fc15f1b8a37142c439cd457c26d9c372..61c5e5739a58f2eeb98a783e05161230af3e9bf6 100644 (file)
@@ -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)/