diff options
author | Marius Mauch <genone@gentoo.org> | 2008-02-09 15:39:49 +0000 |
---|---|---|
committer | Marius Mauch <genone@gentoo.org> | 2008-02-09 15:39:49 +0000 |
commit | 0b756946785d8ac51dd8c82fd4749199fa1e7736 (patch) | |
tree | 667d9bdfb5172b9d85e674d0b1e14809431a016e | |
parent | d23332db6b8a3565fcde1485c294ad9fec2d8c5e (diff) | |
download | portage-0b756946785d8ac51dd8c82fd4749199fa1e7736.tar.gz portage-0b756946785d8ac51dd8c82fd4749199fa1e7736.tar.bz2 portage-0b756946785d8ac51dd8c82fd4749199fa1e7736.zip |
add tagging capabilities and cli options
svn path=/main/trunk/; revision=9312
-rwxr-xr-x | mkrelease.sh | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/mkrelease.sh b/mkrelease.sh index a92413f92..098c80d1b 100755 --- a/mkrelease.sh +++ b/mkrelease.sh @@ -3,13 +3,32 @@ RELEASE_BUILDDIR=${RELEASE_BUILDDIR:-/var/tmp/portage-release} SOURCE_DIR=${RELEASE_BUILDDIR}/checkout BRANCH=${BRANCH:-trunk} -REPOSITORY=svn+ssh://cvs.gentoo.org/var/svnroot/portage/main/${BRANCH} +REPOSITORY=svn+ssh://cvs.gentoo.org/var/svnroot/portage/main +SVN_LOCATION=${REPOSITORY}/${BRANCH} die() { echo $@ + echo "Usage: $(basename $0) [-t|--tag] [-u|--upload <location>] <version>" exit 1 } +while [ "${1:1}" == "-" ]; then + case "$1" in + -t|--tag) + CREATE_TAG=true + shift + ;; + -u|--upload) + [ -z "$2" ] && die "missing argument to upload option" + UPLOAD_LOCATION=${2} + shift; shift + ;; + *) + die "unknown option: $1" + ;; + esac +fi + [ -z "$1" ] && die "Need version argument" [ -n "${1/[0-9]*}" ] && die "Invalid version argument" @@ -22,8 +41,8 @@ rm -rf "${RELEASE_DIR}" "${SOURCE_DIR}" || die "directory cleanup failed" mkdir -p "${RELEASE_DIR}" || die "directory creation failed" -svn export "${REPOSITORY}" "${SOURCE_DIR}" || die "svn export failed" -svn2cl -o "${SOURCE_DIR}/ChangeLog" "${REPOSITORY}" || die "ChangeLog creation failed" +svn export "${SVN_LOCATION}" "${SOURCE_DIR}" > /dev/null || die "svn export failed" +svn2cl -o "${SOURCE_DIR}/ChangeLog" "${SVN_LOCATION}" || die "ChangeLog creation failed" cp -a "${SOURCE_DIR}/"{bin,cnf,doc,man,pym,src} "${RELEASE_DIR}/" || die "directory copy failed" cp "${SOURCE_DIR}/"{ChangeLog,DEVELOPING,NEWS,RELEASE-NOTES,TEST-NOTES,TODO} "${RELEASE_DIR}/" || die "file copy failed" @@ -38,3 +57,9 @@ if [ -n "${UPLOAD_LOCATION}" ]; then else echo "${RELEASE_TARBALL} created" fi + +if [ -n "${CREATE_TAG}" ]; then + echo "Tagging ${VERSION} in repository" + svn cp ${SVN_LOCATION} ${REPOSITORY}/tags/${VERSION} || die "tagging failed" +fi + |