UPD depot xml, zipdepot script
This commit is contained in:
@ -2,6 +2,11 @@
|
||||
|
||||
# Joomla installation at:
|
||||
JOOMLADIR="/srv/http/joomla5"
|
||||
UPDATESERVER="kuschel.at"
|
||||
# the following host must be given in .ssh/config configuration:
|
||||
UPDATESERVERSSH="kuschel"
|
||||
UPDATEDIR="/var/www/kuschel.at/update"
|
||||
UPDATEFILE="extensions.xml"
|
||||
|
||||
# this is a script file to generate a zip package from this source:
|
||||
cd "$(dirname "$0")"
|
||||
@ -42,6 +47,31 @@ fi
|
||||
mkdir -p zip
|
||||
# Generate ZIP file without directories zip, script
|
||||
zip -q -r zip/depot.zip * -x .git/\* -x script/\* -x zip/\*
|
||||
# Make a copy of the ZIP file with version added:
|
||||
|
||||
## get the version from depot.xml, again:
|
||||
version=`xmllint -xpath 'string(//*[local-name()="version"])' depot.xml`
|
||||
major=`echo "$version" | cut -f1 -d.`
|
||||
minor=`echo "$version" | cut -f2 -d.`
|
||||
patch=`echo "$version" | cut -f3 -d.`
|
||||
echo "Now the version is: ${version}"
|
||||
cp -f zip/depot.zip "zip/depot_${version}.zip"
|
||||
echo "Create sha512 checksum"
|
||||
sha512sum zip/depot.zip | tee zip/depot.zip.sha512
|
||||
|
||||
read -p "Do you want to upload the zip file to the update server \"https://kuschel.at/update\"? (y/N)" -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[YyJj]$ ]]
|
||||
then
|
||||
echo "Uploading to the update server"
|
||||
scp "zip/depot_${version}.zip" ${UPDATESERVERSSH}:${UPDATEDIR}/
|
||||
echo "Create sha512 checksum"
|
||||
sha512sum "zip/depot_${version}.zip" | tee "zip/depot_${version}.zip.sha512"
|
||||
scp "zip/depot_${version}.zip.sha512" ${UPDATESERVERSSH}:${UPDATEDIR}/
|
||||
echo "Now you have to edit the extensions.xml on the update server manually."
|
||||
else
|
||||
echo "nothing to do"
|
||||
fi
|
||||
|
||||
# Install this extension to the active Joomla installation per CLI
|
||||
|
||||
|
Reference in New Issue
Block a user