Skip to content

Commit

Permalink
Added addon repo (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
quarckster authored Aug 2, 2020
1 parent c8c0ad2 commit 15b5781
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ jobs:
# script:
# - pytest -vv tests/tests.py
- stage: deploy
language: minimal
language: node_js
node_js:
- node
before_script:
- npm install netlify-cli
script: bash build.sh
deploy:
provider: releases
skip_cleanup: true
prerelease: true
api_key:
secure: lW8+Kb5iTTsS7yZ7WmFE1mluZdUY2sj/FCTCgKQVOpBfOhtoyq5esW/ZXTTk3hBRo8gDjm3Ao3CPqMu1ozFTUXkDcyMNaWFB0cdhwdWn3bgIcj5bXPgXhmAZBAVhLk4logvsTA6u6a2Y1iJdwXfszw3FyIdaGcsAYcRBO3gEF2+zRw/LqktG3RhJ7xwYJAvF9uaWBZ/yuW4zHRgJ7RKd94cUdTv0TpPhsWC97F81do+j8psml6MXZtrzfPgxaWU6IoVk1FJXjSkI9sc5Nr+3A/hhDb8PNA0IUvkJ4yrprTLfWq/IrW5jdY0N8HWXRUrhteSjlggA2xZKvvjodK441ZAZDNcfx24fYYikcc/tSwTyreiJCf/ytPD9xOGloptVBSUJDuEC0EJCF4ah9n9Ge6PjOV1V/Z+ww2LjVqcuet3Llu2luoUnq4jnyGaqJGZYaa/8onFiIBjePvBqHS19Dco9NViDKHJwUk0OMpUkNaAPVb7jR0H9pxX2AcjdC+/hKupVJ6W1LgWqwWa7JfXeN5yDvxmuIkl3bMzggcBR1UKPz0QMPBb2rXwRwUKbwBAf/f3xFZPdxy+8k6sMviMaR3Gam3zpWmBcWSCkUcfaxRn4Nn5uJghz0flEkUmNoDVmqKJXytmyXzwkKxXYnhy9pwuKOTK51pBaAtmTEj8hPbM=
file: video.kino.pub-$TRAVIS_TAG.zip
file: repo/video.kino.pub/video.kino.pub-$TRAVIS_TAG.zip
on:
tags: true
repo: quarckster/kodi.kino.pub
35 changes: 26 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,29 @@ fi

DIR=video.kino.pub-$VERSION

mkdir $DIR
echo "Copying the files to a temporary directory"
echo "=========================================="
VERSION=$VERSION envsubst < src/addon.xml > $DIR/addon.xml
rsync -rv --exclude=*.pyc src/resources src/addon.py LICENSE $DIR
echo
echo "Creating the addon archive"
echo "=========================="
zip -rv -9 -m $DIR.zip $DIR
function build_addon() {
mkdir $DIR
echo "Copying the files to a temporary directory"
echo "=========================================="
VERSION=$VERSION envsubst < src/addon.xml > $DIR/addon.xml
rsync -rv --exclude=*.pyc src/resources src/addon.py LICENSE $DIR
echo
echo "Creating the addon archive"
echo "=========================="
zip -rv -9 -m $DIR.zip $DIR
}

function deploy_netlify() {
echo "Deploying files to Netlify"
echo "=========================="
mkdir -p repo.kino.pub repo/video.kino.pub
VERSION=$VERSION envsubst < repo_src/addons.xml > repo/addons.xml
md5sum repo/addons.xml | cut -d " " -f 1 > repo/addons.xml.md5
cp repo_src/addon.xml repo_src/icon.png repo.kino.pub/
zip -rv -9 -m repo/repo.kino.pub.zip repo.kino.pub
mv $DIR.zip repo/video.kino.pub
node_modules/netlify-cli/bin/run deploy --dir=repo --prod --auth=$NETLIFY_AUTH_TOKEN --site=$NETLIFY_SITE_ID
}

build_addon
deploy_netlify
16 changes: 16 additions & 0 deletions repo_src/addon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="repo.kino.pub" name="Kino.pub Add-On Repository" version="1.1.0" provider-name="quarckster">
<extension point="xbmc.addon.repository" name="Kino.pub Add-On Repository">
<dir>
<info compressed="false">https://kodi-kino-pub.netlify.app/addons.xml</info>
<checksum>https://kodi-kino-pub.netlify.app/addons.xml.md5</checksum>
<datadir zip="true">https://kodi-kino-pub.netlify.app/</datadir>
</dir>
</extension>
<extension point="xbmc.addon.metadata">
<summary>kino.pub - онлайн-кинотеатр.</summary>
<description></description>
<disclaimer></disclaimer>
<platform>all</platform>
</extension>
</addon>
34 changes: 34 additions & 0 deletions repo_src/addons.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addons>
<addon id="repo.kino.pub" name="Kino.pub Add-On Repository" version="1.1.0" provider-name="quarckster">
<extension point="xbmc.addon.repository" name="Kino.pub Add-On Repository">
<dir>
<info compressed="false">https://kodi-kino-pub.netlify.app/addons.xml</info>
<checksum>https://kodi-kino-pub.netlify.app/addons.xml.md5</checksum>
<datadir zip="true">https://kodi-kino-pub.netlify.app/</datadir>
</dir>
</extension>
<extension point="xbmc.addon.metadata">
<summary>kino.pub - онлайн-кинотеатр.</summary>
<description></description>
<disclaimer></disclaimer>
<platform>all</platform>
</extension>
</addon>

<addon id="video.kino.pub" name="kino.pub" version="${VERSION}" provider-name="quarckster">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.inputstreamhelper" version="0.3.4" optional="true"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary>kino.pub - онлайн-кинотеатр.</summary>
<platform>all</platform>
<license>BSD-3-Clause</license>
<source>https://github.com/quarckster/kodi.kino.pub</source>
</extension>
</addon>
</addons>
Binary file added repo_src/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 15b5781

Please sign in to comment.