Preliminary preparations for deployment are set up

This commit is contained in:
2019-06-13 11:02:39 +02:00
parent 28494f6142
commit c95b3c31a6
17 changed files with 219 additions and 21 deletions

23
scripts/create-release.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
MAJOR=`cat serial/major`
MINOR=`cat serial/minor`
RELEASE=`cat serial/release`
TOTRELEASE="$MAJOR.$MINOR.$RELEASE"
outname="releases/clubs-$TOTRELEASE.tar.gz"
mkdir -p releases
# First check if the named release exists already
if [ -f "$outname" ]; then
if [ "$1" = '-f' ]; then
echo "Overwriting existing file $outname."
else
echo "The file $outname existes already. Either remove the release from the folder manually or increase the release version."
echo "Aborting."
exit 1
fi
fi
cp clubs.tar.gz "$outname"

23
scripts/create-update-xml.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
# DL_PREFIX="https://slt.wolf-stuttgart.net/update/template"
cat res/prefix.template > slt-update.xml
find releases -name clubs-\* | while read f
do
VSTR=`echo "$f" | sed -E 's@releases/clubs-@@; s@^([0-9]+\.[0-9]+\.[0-9]+).*$@\1@'`
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
cat res/postfix.template >> slt-update.xml