man/dispatch-conf.1: reflow text
[portage.git] / mkrelease.sh
index 221d8a8b96bf206eb579a36abae0adde692485a8..8831f31d28fbeef7edfea40b4e65f922275247f6 100755 (executable)
@@ -65,17 +65,26 @@ git archive --format=tar $TREE_ISH | \
        tar -xf - -C "$SOURCE_DIR" || die "git archive failed"
 
 echo ">>> Building release tree"
-cp -a "${SOURCE_DIR}/"{bin,cnf,doc,man,pym} "${RELEASE_DIR}/" || die "directory copy failed"
-cp "${SOURCE_DIR}/"{DEVELOPING,LICENSE,NEWS,RELEASE-NOTES,TEST-NOTES} \
+cp -a "${SOURCE_DIR}/"{bin,cnf,doc,man,misc,pym} "${RELEASE_DIR}/" || die "directory copy failed"
+cp "${SOURCE_DIR}/"{DEVELOPING,LICENSE,Makefile,NEWS,RELEASE-NOTES,TEST-NOTES} \
        "${RELEASE_DIR}/" || die "file copy failed"
 
 rm -rf "$SOURCE_DIR" || die "directory cleanup failed"
 
+echo ">>> Setting portage.VERSION"
+sed -e "s/^VERSION=.*/VERSION=\"${VERSION}\"/" \
+       -i "${RELEASE_DIR}/pym/portage/__init__.py" || \
+       die "Failed to patch portage.VERSION"
+
 echo ">>> Creating Changelog"
 git_log_opts=""
-[ -n "$CHANGELOG_REVISION" ] && git_log_opts+=" $CHANGELOG_REVISION^.."
+if [ -n "$CHANGELOG_REVISION" ] ; then
+       git_log_opts+=" $CHANGELOG_REVISION^..$TREE_ISH"
+else
+       git_log_opts+=" $TREE_ISH"
+fi
 skip_next=false
-git log $git_log_opts | fmt -w 80 -p "    " | while read ; do
+git log $git_log_opts | fmt -w 80 -p "    " | while read -r ; do
        if [[ $skip_next = true ]] ; then
                skip_next=false
        elif [[ $REPLY = "    svn path="* ]] ; then