UPD zip depot script with zip files for 0.9.25

This commit is contained in:
2025-07-15 23:46:50 +02:00
parent 7c85ceea8e
commit 0a7899b3f2
4 changed files with 72 additions and 11 deletions

28
script/extensions.xml Executable file
View File

@ -0,0 +1,28 @@
<?xml version="1.0"?>
<updates>
<update>
<name>Depot</name>
<description>Depot component</description>
<element>com_depot</element>
<type>component</type>
<version>0.9.25</version>
<infourl title="Gitea Versioning">
https://git.kuschel.at/tom/depot
</infourl>
<downloads>
<downloadurl type="full" format="zip">https://kuschel.at/update/depot_0.9.25.zip</downloadurl>
</downloads>
<tags>
<tag>dev</tag> <!-- Development versions, very unstable and pre-alpha (e.g. nightly builds) -->
<!-- <tag>alpha</tag> --> <!-- Alpha quality software (features not implemented, show-stopper bugs) -->
<!-- <tag>beta</tag> --> <!-- Beta quality software (all features implemented, show-stopper bugs possible,minor bugs almost certain) -->
<!-- <tag>rc</tag> --> <!-- Release Candidate quality software (no show stopper bugs, minor bugs may still be present) -->
<!-- <tag>stable</tag> --> <!-- Production quality software. All other tags are currently ignored. -->
</tags>
<targetplatform name="joomla" version="5.[0123]"/>
<php_minimum>8.1</php_minimum>
<sha512>0ddb7aacf48594f37ef0341a7d29b9f8fb713ad454d0b3275fa8ff7cc471ca32754f100a1d78921320699233f07541a43664b70567f0335ea5dfdc869dc0a394</sha512>
<maintainer>KW4NZ</maintainer>
<maintainerurl>https://kuschel.at</maintainerurl>
</update>
</updates>

View File

@ -1,15 +1,17 @@
#!/bin/bash
# Joomla installation at:
JOOMLADIR="/srv/http/joomla5"
# Local Joomla installation at:
JOOMLADIR=~/github/joomla-cms
UPDATESERVER="kuschel.at"
# the following host must be given in .ssh/config configuration:
UPDATESERVERSSH="kuschel"
UPDATEDIR="/var/www/kuschel.at/update"
UPDATEFILE="extensions.xml"
UPDATEURL="https://kuschel.at/update"
# this is a script file to generate a zip package from this source:
cd "$(dirname "$0")"
SCRIPTPATH="$( cd -- "$(dirname "$0")" > /dev/null 2>&1 ; pwd -P )"
cd ..
# now we are at the depot directory
# if there is a file named depot.xml, we ask to increase the version with
@ -66,9 +68,38 @@ 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."
# sha512sum "zip/depot_${version}.zip" | awk '{print $1}' | tee "zip/depot_${version}.zip.sha512"
SHA512=$(sha512sum "zip/depot_${version}.zip" | awk '{print $1}' | tee "zip/depot_${version}.zip.sha512")
echo ${SHA512}
scp "zip/depot_${version}.zip.sha512" ${UPDATESERVERSSH}:${UPDATEDIR}/
echo "Now you have to edit the extensions.xml on the update server manually,"
read -p "or do you want to automatically adjust the extensions.xml file on the update server ${UPDATESERVER}? (y/N)" -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[YyJy]$ ]]
then
## first fetch the file from the server
scp ${UPDATESERVERSSH}:${UPDATEDIR}/${UPDATEFILE} ${SCRIPTPATH}/
echo "Now we make a backup of this file ${UPDATEFILE}"
cp -f "${SCRIPTPATH}/${UPDATEFILE}" "${SCRIPTPATH}/${UPDATEFILE}.bak"
## now we change the right entries in the file:
xmllint --shell "${SCRIPTPATH}/${UPDATEFILE}" << EOF
cd /updates/update/version
set ${version}
cd /updates/update/downloads/downloadurl
set ${UPDATEURL}/depot_${version}.zip
cd /updates/update/sha512
set ${SHA512}
save
EOF
echo "Unified DIFF:"
diff -u "${SCRIPTPATH}/${UPDATEFILE}.bak" "${SCRIPTPATH}/${UPDATEFILE}"
echo "Copy updated file to server..."
scp "${SCRIPTPATH}/${UPDATEFILE}" ${UPDATESERVERSSH}:${UPDATEDIR}/${UPDATEFILE}
else
echo "Please edit the extensions.xml on the update server manually."
fi
else
echo "nothing to do"
fi
@ -82,8 +113,8 @@ then
echo "Extension was not installed"
else
# Find the CLI php procedure, file joomla.php in cli must exists.
FILE="${JOOMLADIR}/cli/joomla.php"
if [ -f "$FILE" ]
FILE=${JOOMLADIR}/cli/joomla.php
if [ -f $FILE ]
then
echo "$FILE exists."
php $FILE --version

BIN
zip/depot.zip (Stored with Git LFS)

Binary file not shown.

BIN
zip/depot.zip.sha512 (Stored with Git LFS)

Binary file not shown.