BRANCH=${BRANCH:-trunk}
REPOSITORY=svn+ssh://cvs.gentoo.org/var/svnroot/portage/main
SVN_LOCATION=${REPOSITORY}/${BRANCH}
+CHANGELOG_REVISION=""
+CREATE_TAG=
+CHANGELOG_REVISION=
+UPLOAD_LOCATION=
die() {
echo $@
exit 1
}
-ARGS=$(getopt -o tu: --long anon,tag,upload: -n $(basename $0) -- "$@")
+ARGS=$(getopt -o tu: --long anon,changelog-rev:,tag,upload: \
+ -n ${0##*/} -- "$@")
[ $? != 0 ] && die "initialization error"
eval set -- "${ARGS}"
SVN_LOCATION=${REPOSITORY}/${BRANCH}
shift
;;
+ --changelog-rev)
+ CHANGELOG_REVISION=$2
+ shift 2
+ ;;
-t|--tag)
CREATE_TAG=true
shift
svn export "${SVN_LOCATION}" "${SOURCE_DIR}" > /dev/null || die "svn export failed"
echo ">>> Creating Changelog"
-svn2cl -o "${SOURCE_DIR}/ChangeLog" "${SVN_LOCATION}" || die "ChangeLog creation failed"
+svn2cl_opts="-i --reparagraph"
+[ -n $CHANGELOG_REVISION ] && svn2cl_opts+=" -r HEAD:$CHANGELOG_REVISION"
+svn2cl $svn2cl_opts -o "${SOURCE_DIR}/ChangeLog" "${SVN_LOCATION}" \
+ || die "ChangeLog creation failed"
echo ">>> Building release tree"
cp -a "${SOURCE_DIR}/"{bin,cnf,doc,man,pym,src} "${RELEASE_DIR}/" || die "directory copy failed"