Dumped documentation is not stored in the repository, it would just bloat it.
refs #6848
--- /dev/null
+#!/bin/bash
+
+major=$1
+minor=$2
+service=$3
+wikidb=$4
+wikidbusr=$5
+
+srcdb=${wikidb}
+srcdbusr=${wikidbusr}
+tgtdb=${wikidb}_${major}_${minor}_${service}
+
+echo "Dumping database ${srcdb} to ${tgtdb} as user ${srcdbusr}"
+echo "Press enter to continue or C-c to cancel"
+read foo
+
+echo "Dumping $srcdb"
+mysqldump -u ${srcdbusr} -p ${srcdb} > ${tgtdb}.dump
--- /dev/null
+#!/bin/bash
+
+
+major=1
+minor=25
+service=0
+ver=${major}.${minor}.${service}
+
+mkdir ${ver}
+cd ${ver}
+OLDIFS=$IFS
+IFS=','
+for db in enduserwikidb,enduserwikiuser devwikidb,devwikiuser; do
+ set $db
+ sh ../dump-mysql-db.sh ${major} ${minor} ${service} ${1} ${2}
+done
+IFS=$OLDIFS
+
+cd ..
+tar zcvf ${ver}.tar.gz ${ver}
+rm -rf ${ver}
<!DOCTYPE html>\r
<html>\r
<head>\r
-<title>MarkdownPad Document</title>\r
+<title>release</title>\r
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
<style type="text/css">\r
/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */\r
<p>Note The -m argument must be supplied to create an <a href="https://git-scm.com/book/en/v2/Git-Basics-Tagging">annotated tag</a>.\r
Only annotated or signed tags can be pushed to Gerrit.</p>\r
</blockquote>\r
-<h2>Tag documentation wikis</h2>\r
-<p>Tag documentation wiki using <a href="./tag.sh">tag.sh</a> script.</p>\r
-<p>The wiki documentation is mainly in MediaWiki installations. The only sane way to tag the documentation is to clone it:</p>\r
-<ul>\r
-<li>Copy the wiki installation from wiki to ${release_version}/wiki</li>\r
-<li>Copy the trunk wiki MySQL database into a new version</li>\r
-<li>Reconfigure the tagged wiki (LocalSettings.php) to use the copied database and no longer allow any edits</li>\r
-</ul>\r
+<h2>Dump documentation wikis</h2>\r
+<p>Dump documentation wiki using <a href="./dump-wikis.sh">dump-wikis.sh</a> script.</p>\r
+<p>The wiki documentation is mainly in MediaWiki installations. The only\r
+sane way to tag the documentation is to back up the mysql database\r
+backing the wiki.</p>\r
<h2>Compile change log entry</h2>\r
<ul>\r
<li>Edit the <a href="https://www.simantics.org/redmine/projects/simantics-platform/wiki/ChangeLog">main page</a> and add a a link for release x.y.z[.w].</li>\r
> Note The -m argument must be supplied to create an [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging).\r
> Only annotated or signed tags can be pushed to Gerrit.\r
\r
-## Tag documentation wikis\r
+## Dump documentation wikis\r
\r
-Tag documentation wiki using [tag.sh](./tag.sh) script.\r
+Dump documentation wiki using [dump-wikis.sh](./dump-wikis.sh) script.\r
\r
-The wiki documentation is mainly in MediaWiki installations. The only sane way to tag the documentation is to clone it:\r
-* Copy the wiki installation from wiki to ${release_version}/wiki\r
-* Copy the trunk wiki MySQL database into a new version\r
-* Reconfigure the tagged wiki (LocalSettings.php) to use the copied database and no longer allow any edits\r
+The wiki documentation is mainly in MediaWiki installations. The only\r
+sane way to tag the documentation is to back up the mysql database\r
+backing the wiki.\r
\r
## Compile change log entry\r
\r
+++ /dev/null
-#!/bin/bash
-
-major=$1
-minor=$2
-www=/var/www
-wikiname=http-dev.simantics.org
-wikidb=devwikidb
-wikidbuser=devwikiuser
-
-releasewww=${www}/${major}.${minor}
-
-srcdb=${wikidb}
-tgtdb=${wikidb}_${major}_${minor}
-
-echo "Release version: $major.$minor"
-
-function myexecute() {
- echo "Sending to mysql using database $1: $2"
- echo $2 | mysql -u root -p $1
-}
-
-# dump wiki db to file
-echo "Dumping $srcdb"
-mysqldump -p ${srcdb} > ${tgtdb}.dump
-# load wiki db from file to name ${wikidb}_x_y, where x_y are major.minor version numbers
-# add privileges for ${wikidbuser} to ${wikidb}_x_y
-echo "Importing ${tgtdb}"
-cat > import_${major}_${minor}.sql <<EOF
-drop database ${tgtdb};
-create database ${tgtdb};
-grant all privileges on $tgtdb.* to '${wikidbuser}'@'localhost';
-grant all privileges on $tgtdb.* to '${wikidbuser}'@'%';
-use $tgtdb;
-source ${tgtdb}.dump;
-EOF
-myexecute $srcdb "source import_${major}_${minor}.sql;"
-
-# copy /var/www/http-dev.simantics.org/ to /var/www/http-dev.simantics.org/x.y/wiki
-echo "Copying wiki www-directory $www to $releasewww"
-mkdir -p ${releasewww}
-cp -a ${www}/${wikiname} ${releasewww}
-
-# change /var/www/https-www.simantics.org/x.y/wiki/LocalSettings.php to use simwikidb_x_y
-echo "Fixing released wiki settings"
-cat $www/$wikiname/LocalSettings.php | sed -e "s/$srcdb/$tgtdb/" |sed -e "s/\/${wikiname}/\/$major\.$minor\/${wikiname}/"> $releasewww/${wikiname}/LocalSettings.php
-echo '$wgReadOnly = "Released version, no further changes allowed.";' >> $releasewww/${wikiname}/LocalSettings.php
-
+++ /dev/null
-#!/bin/bash
-
-major=$1
-minor=$2
-www=$3
-#www=/var/www/https-www.simantics.org
-wikiname=$4
-#wikiname=wiki
-wikidb=$5
-wikidbuser=$6
-
-releasewww=${www}/${major}.${minor}
-
-srcdb=${wikidb}
-tgtdb=${wikidb}_${major}_${minor}
-
-echo "Release version: $major.$minor"
-
-function myexecute() {
- echo "Sending to mysql using database $1: $2"
- echo $2 | mysql -u root -p $1
-}
-
-# dump wiki db to file
-echo "Dumping $srcdb"
-mysqldump -p ${srcdb} > ${tgtdb}.dump
-# load wiki db from file to name ${wikidb}_x_y, where x_y are major.minor version numbers
-# add privileges for ${wikidbuser} to ${wikidb}_x_y
-echo "Importing ${tgtdb}"
-cat > import_${major}_${minor}.sql <<EOF
-drop database if exists ${tgtdb};
-create database ${tgtdb};
-grant all privileges on $tgtdb.* to '${wikidbuser}'@'localhost';
-grant all privileges on $tgtdb.* to '${wikidbuser}'@'%';
-use $tgtdb;
-source ${tgtdb}.dump;
-EOF
-myexecute $srcdb "source import_${major}_${minor}.sql;"
-
-# copy /var/www/https-www.simantics.org/wiki to /var/www/https-www.simantics.org/x.y/wiki
-echo "Copying wiki www-directory $www to $releasewww"
-mkdir -p ${releasewww}
-cp -a ${www}/${wikiname} ${releasewww}/${wikiname}
-
-# change /var/www/https-www.simantics.org/x.y/wiki/LocalSettings.php to use simwikidb_x_y
-echo "Fixing released wiki settings"
-cat $www/$wikiname/LocalSettings.php | sed -e "s/$srcdb/$tgtdb/" |sed -e "s/\/${wikiname}/\/$major\.$minor\/${wikiname}/"> $releasewww/${wikiname}/LocalSettings.php
-echo '$wgReadOnly = "Released version, no further changes allowed.";' >> $releasewww/${wikiname}/LocalSettings.php
-
+++ /dev/null
-#!/bin/bash
-
-./tag-wiki.sh 1 4 /var/www/https-www.simantics.org end_user_wiki enduserwikidb enduserwikiuser
-#./tag-dev-wiki.sh 1 4
-