Skip to content

Commit

Permalink
Templatized addon.xml, small improvements of build script
Browse files Browse the repository at this point in the history
  • Loading branch information
quarckster committed Oct 16, 2018
1 parent 96fcd34 commit 4eb7c23
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
5 changes: 2 additions & 3 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="video.kino.pub" name="kino.pub" version="2.1.2" provider-name="kino.pub">
<addon id="video.kino.pub" name="kino.pub" version="${VERSION}" provider-name="kino.pub">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
Expand All @@ -11,5 +11,4 @@
<description></description>
<platform>all</platform>
</extension>
</addon>

</addon>
23 changes: 19 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
#!/bin/bash

VERSION=`git tag -l | tail -n1`
DIR=video.kino.pub-$VERSION
if [[ -d .git ]]; then
VERSION=`git tag -l | tail -n1`
elif [[ $# -eq 0 ]]; then
echo "Current directory is not a git repository."
echo "Provide a version as an argument."
exit 1
else
VERSION=$1
fi

DIR=video.kino.pub-$VERSION

mkdir $DIR
cp -r resources addon.xml default.py icon.png $DIR
zip -r -9 -m $DIR.zip $DIR > /dev/null
echo "Copying the files to a temporary directory"
echo "=========================================="
VERSION=$VERSION envsubst < addon.xml > $DIR/addon.xml
rsync -rv --exclude=*.pyc resources default.py icon.png $DIR
echo
echo "Creating the addon archive"
echo "=========================="
zip -rv -9 -m $DIR.zip $DIR

0 comments on commit 4eb7c23

Please sign in to comment.