Allow building different versions for different target platforms

This commit is contained in:
Christian Wolf 2022-04-09 12:40:04 +02:00
parent bb7365409a
commit c686c3dcf9
13 changed files with 166 additions and 20 deletions

View File

@ -2,7 +2,7 @@
# UPDATE_PATH=/srv/slt-update # UPDATE_PATH=/srv/slt-update
PACKAGES = slt.tar.gz PACKAGES = slt.tar.gz
export DL_PREFIX=https://slt.wolf-stuttgart.net/update/template export DL_PREFIX=https://slt.wolf-stuttgart.net/update/template/files
RSYNC_OPTIONS=-rltDz --delete --delete-delay --delete-excluded --exclude '.gitignore' RSYNC_OPTIONS=-rltDz --delete --delete-delay --delete-excluded --exclude '.gitignore'
RSYNC_USER=christian RSYNC_USER=christian

16
releases/slt-0.0.1.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.1</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.1.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

16
releases/slt-0.0.10.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.10</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.10.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

16
releases/slt-0.0.3.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.3</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.3.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

16
releases/slt-0.0.4.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.4</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.4.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

16
releases/slt-0.0.5.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.5</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.5.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

16
releases/slt-0.0.6.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.6</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.6.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

16
releases/slt-0.0.7.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.7</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.7.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

16
releases/slt-0.0.8.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.8</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.8.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

16
releases/slt-0.0.9.xml Normal file
View File

@ -0,0 +1,16 @@
<update>
<name>SLT Template</name>
<description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element>
<type>template</type>
<client>site</client>
<version>0.0.9</version>
<downloads>
<downloadurl type="full" format="tar.gz">$DL_PREFIX/slt-0.0.9.tar.gz</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version="3.[012345678]|3.10"/>
</update>

View File

@ -3,14 +3,18 @@
<description>Template for the SLT for the Joomla! CMS</description> <description>Template for the SLT for the Joomla! CMS</description>
<element>slt</element> <element>slt</element>
<type>template</type> <type>template</type>
<client>0</client> <client>site</client>
<version>__VERSION__</version> <version>$VERSION</version>
<downloads> <downloads>
<downloadurl type="full" format="__FORMAT__">__DOWNLOAD_URL__</downloadurl> <downloadurl type="full" format="$FORMAT">$DOWNLOAD_URL</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>stable</tag> <tag>stable</tag>
<!--<tag>rc</tag>-->
<!--<tag>beta</tag>-->
<!--<tag>alpha</tag>-->
<!--<tag>dev</tag>-->
</tags> </tags>
<maintainer>Christian Wolf</maintainer> <maintainer>Christian Wolf</maintainer>
<targetplatform name="joomla" version=".*"/> <targetplatform name="joomla" version="4.[0]"/>
</update> </update>

View File

@ -5,7 +5,10 @@ MINOR=`cat serial/minor`
RELEASE=`cat serial/release` RELEASE=`cat serial/release`
TOTRELEASE="$MAJOR.$MINOR.$RELEASE" TOTRELEASE="$MAJOR.$MINOR.$RELEASE"
outname="releases/slt-$TOTRELEASE.tar.gz" filebase="slt-$TOTRELEASE"
filename="$filebase.tar.gz"
outname="releases/$filename"
xmlname="releases/$filebase.xml"
mkdir -p releases mkdir -p releases
@ -17,3 +20,9 @@ if [ -f "$outname" ]; then
fi fi
cp slt.tar.gz "$outname" cp slt.tar.gz "$outname"
export VERSION="$TOTALRELEASE"
export FORMAT='tar.gz'
export DOWNLOAD_URL="\$DL_PREFIX/$filename"
cat res/update.template | envsubst > "$xmlname"

View File

@ -1,22 +1,11 @@
#!/bin/bash #!/bin/bash
# DL_PREFIX="https://slt.wolf-stuttgart.net/update/template"
cat res/prefix.template > slt-update.xml cat res/prefix.template > slt-update.xml
find releases -name slt-\* | sort -V | while read f find releases -name slt-\*.xml | sort -V | while read f
do do
# Replace DL_PREFIX in the XML parts and combine them
VSTR=`echo "$f" | sed -E 's@releases/slt-@@; s@^([0-9]+\.[0-9]+\.[0-9]+).*$@\1@'` cat "$f" | envsubst >> slt-update.xml
FILE=`echo "$f" | sed 's@releases/@@'`
FORMAT=`echo "$f" | sed -E 's@^.*[0-9]+\.[0-9]+\.[0-9]+\.@@'`
sed '
s@__VERSION__@'"$VSTR"'@g;
s@__DOWNLOAD_URL__@'"$DL_PREFIX/files/$FILE"'@g;
s@__FORMAT__@'"$FORMAT"'@g
' res/update.template >> slt-update.xml
done done