Remove "internal" bugs from Changelog. Make build-packages write simple version and update sphinx-build/conf.py. Make write-user-docs remove double blank lines. Remove pt-checksum-filter and other removed tools from user docs.

This commit is contained in:
Daniel Nichter
2011-08-31 09:44:31 -06:00
parent 52ef2062e6
commit 8c6f6a7f17
14 changed files with 47 additions and 146 deletions

View File

@@ -65,6 +65,7 @@ cd $cwd
# ############################################################################
DOCS_DIR=$BRANCH/docs
SPHINX_CONFIG_DIR=$BRANCH/config/sphinx-build
DEB_CONFIG_DIR=$BRANCH/config/deb
RPM_CONFIG_DIR=$BRANCH/config/rpm
RELEASE_DIR=$BRANCH/release
@@ -123,19 +124,16 @@ check_rel_notes() {
update_version() {
echo -n "Updating version in tools... "
cd $BRANCH/bin
local new_version_str="Percona Toolkit v$VERSION released $DATE"
for tool_file in *; do
sed -i'.bak' -e "s/^Percona Toolkit v.*/$new_version_str/" $tool_file
sed -i'.bak' -e "s/^$tool [0-9]\./$tool $VERSION/" $tool_file
if [ $? -ne 0 ]; then
die "Error updating version in $tool_file"
fi
rm "$tool_file.bak"
done
local new_versions=$(grep --no-filename '^Percona Toolkit v' * | sort -u)
if [ "$new_versions" != "$new_version_str" ]; then
local new_versions=$(grep --no-filename '^pt-[^ ]\+ [0-9]\.' * | cut -d' ' -f2 | sort -u)
if [ "$new_versions" != "$VERSION" ]; then
die "The version in some tool did not update correctly"
fi
echo "OK"
@@ -151,12 +149,28 @@ update_version() {
echo -n "Updating version in percona-toolkit.pod... "
cd $DOCS_DIR
sed -i'.bak' -e "s/^Percona Toolkit v.*/$new_version_str/" percona-toolkit.pod
sed -i'.bak' -e "s/^Percona Toolkit v.*/Percona Toolkit v$VERSION released $DATE/" percona-toolkit.pod
if [ $? -ne 0 ]; then
die "Error updating version in percona-toolkit.pod"
fi
rm "percona-toolkit.pod.bak"
echo "OK"
echo -n "Updating version in sphinx-build/conf.py... "
# What Sphinx calls verison, we call series; what it calls release we
# call version.
cd $SPHINX_CONFIG_DIR
sed -i'.bak' -e "s/^version =/version = '$SERIES'/" conf.py
if [ $? -ne 0 ]; then
die "Error updating version in conf.py"
fi
rm "conf.py.bak"
sed -i'.bak' -e "s/^release =/version = '$VERSION'/" conf.py
if [ $? -ne 0 ]; then
die "Error updating release in conf.py"
fi
rm "conf.py.bak"
echo "OK"
}
update_copyright_year() {
@@ -414,6 +428,7 @@ fi
# Setting LANG as such works for me; hopefully it works for you, too.
LANG='en_US.UTF-8'
SERIES=$(echo $VERISON | sed 's/\.[0-9][0-9]*$//')
YEAR=$(date -u +'%Y') # for updating copyright year
DATE=$(date -u +'%F') # for updating release date
DEB_DATE=$(date -u +'%a, %d %b %Y %T %z') # for updating deb/changelog

View File

@@ -96,8 +96,13 @@ write_index() {
fi
$BRANCH/util/extract-text $DOCS/percona-toolkit.pod "^=head1 $header" "^=head1|=cut" > /tmp/$filename.pod
cat /tmp/$filename.pod | pod2rst > $RST/$filename.rst
if [ $section = "DESCRIPTION" ]; then
sed -i.bak -e 's/DESCRIPTION/Percona Toolkit Documentation/' /tmp/$filename.pod
fi
cat /tmp/$filename.pod | pod2rst | sed -e 's/.. highlight:: perl//g' > /tmp/$filename.tmp
cat -s /tmp/$filename.tmp > $RST/$filename.rst
rm /tmp/$filename.pod
rm /tmp/$filename.tmp
echo "Wrote $RST/$filename.rst"
done
@@ -126,19 +131,22 @@ write_index() {
# Script starts here
# ############################################################################
if [ $# -gt 0 ]; then
for tool; do
write_rst $tool
done
fi
WRITE=${WRITE:-1}
if [ $WRITE -eq 1 ]; then
if [ $# -gt 0 ]; then
for tool; do
write_rst $tool
done
fi
if [ ! -f "$RST/index.rst" ] || [ "$DOCS/percona-toolkit.pod" -nt "$RST/index.rst" ]; then
write_index
fi
if [ ! -f "$RST/index.rst" ] || [ "$DOCS/percona-toolkit.pod" -nt "$RST/index.rst" ]; then
write_index
fi
if [ ! -f "$RST/release_notes.rst" ] || [ "$DOCS/release_notes.rst" -nt "$RST/release_notes.rst" ]; then
cp $DOCS/release_notes.rst $RST/
echo "Wrote $RST/release_notes.rst"
if [ ! -f "$RST/release_notes.rst" ] || [ "$DOCS/release_notes.rst" -nt "$RST/release_notes.rst" ]; then
cp $DOCS/release_notes.rst $RST/
echo "Wrote $RST/release_notes.rst"
fi
fi
BUILD=${BUILD:-1}