Merge branch 'bp/remote-mw-tests'
* bp/remote-mw-tests: git-remote-mediawiki: remove hardcoded version number in the test suite
This commit is contained in:
@ -336,20 +336,21 @@ wiki_install () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Fetch MediaWiki's archive if not already present in the TMP directory
|
# Fetch MediaWiki's archive if not already present in the TMP directory
|
||||||
|
MW_FILENAME="mediawiki-$MW_VERSION_MAJOR.$MW_VERSION_MINOR.tar.gz"
|
||||||
cd "$TMP"
|
cd "$TMP"
|
||||||
if [ ! -f "$MW_VERSION.tar.gz" ] ; then
|
if [ ! -f $MW_FILENAME ] ; then
|
||||||
echo "Downloading $MW_VERSION sources ..."
|
echo "Downloading $MW_VERSION_MAJOR.$MW_VERSION_MINOR sources ..."
|
||||||
wget "http://download.wikimedia.org/mediawiki/1.19/mediawiki-1.19.0.tar.gz" ||
|
wget "http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/$MW_FILENAME" ||
|
||||||
error "Unable to download "\
|
error "Unable to download "\
|
||||||
"http://download.wikimedia.org/mediawiki/1.19/"\
|
"http://download.wikimedia.org/mediawiki/$MW_VERSION_MAJOR/"\
|
||||||
"mediawiki-1.19.0.tar.gz. "\
|
"$MW_FILENAME. "\
|
||||||
"Please fix your connection and launch the script again."
|
"Please fix your connection and launch the script again."
|
||||||
echo "$MW_VERSION.tar.gz downloaded in `pwd`. "\
|
echo "$MW_FILENAME downloaded in `pwd`. "\
|
||||||
"You can delete it later if you want."
|
"You can delete it later if you want."
|
||||||
else
|
else
|
||||||
echo "Reusing existing $MW_VERSION.tar.gz downloaded in `pwd`."
|
echo "Reusing existing $MW_FILENAME downloaded in `pwd`."
|
||||||
fi
|
fi
|
||||||
archive_abs_path=$(pwd)/"$MW_VERSION.tar.gz"
|
archive_abs_path=$(pwd)/$MW_FILENAME
|
||||||
cd "$WIKI_DIR_INST/$WIKI_DIR_NAME/" ||
|
cd "$WIKI_DIR_INST/$WIKI_DIR_NAME/" ||
|
||||||
error "can't cd to $WIKI_DIR_INST/$WIKI_DIR_NAME/"
|
error "can't cd to $WIKI_DIR_INST/$WIKI_DIR_NAME/"
|
||||||
tar xzf "$archive_abs_path" --strip-components=1 ||
|
tar xzf "$archive_abs_path" --strip-components=1 ||
|
||||||
@ -431,5 +432,5 @@ wiki_delete () {
|
|||||||
# Delete the wiki's SQLite database
|
# Delete the wiki's SQLite database
|
||||||
rm -f "$TMP/$DB_FILE" || error "Database $TMP/$DB_FILE could not be deleted."
|
rm -f "$TMP/$DB_FILE" || error "Database $TMP/$DB_FILE could not be deleted."
|
||||||
rm -f "$FILES_FOLDER/$DB_FILE"
|
rm -f "$FILES_FOLDER/$DB_FILE"
|
||||||
rm -rf "$TMP/$MW_VERSION"
|
rm -rf "$TMP/mediawiki-$MW_VERSION_MAJOR.$MW_VERSION_MINOR.tar.gz"
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,8 @@ WEB_WWW=$WEB/www
|
|||||||
|
|
||||||
# The variables below are used by the script to install a wiki.
|
# The variables below are used by the script to install a wiki.
|
||||||
# You should not modify these unless you are modifying the script itself.
|
# You should not modify these unless you are modifying the script itself.
|
||||||
MW_VERSION=mediawiki-1.19.0
|
# tested versions: 1.19.X -> 1.21.1
|
||||||
|
MW_VERSION_MAJOR=1.21
|
||||||
|
MW_VERSION_MINOR=1
|
||||||
FILES_FOLDER=install-wiki
|
FILES_FOLDER=install-wiki
|
||||||
DB_INSTALL_SCRIPT=db_install.php
|
DB_INSTALL_SCRIPT=db_install.php
|
||||||
|
Reference in New Issue
Block a user