diff --git a/build.py b/.build/build.py similarity index 96% rename from build.py rename to .build/build.py index 762d14ea..1fc528d7 100644 --- a/build.py +++ b/.build/build.py @@ -35,7 +35,7 @@ def create_addon_xml(config: dict, source: str, py_version: str) -> None: Create addon.xml from template file """ # Load template file - with open('{}/.config/template.xml'.format(source), 'r') as f: + with open('{}/.build/template.xml'.format(source), 'r') as f: tree = ET.parse(f) root = tree.getroot() @@ -92,7 +92,7 @@ def folder_filter(folder_name: str) -> bool: return ('.ci' not in folder_name and '.git' not in folder_name and '.github' not in folder_name - and '.config' not in folder_name) + and '.build' not in folder_name) if __name__ == '__main__': diff --git a/.config/template.xml b/.build/template.xml similarity index 100% rename from .config/template.xml rename to .build/template.xml diff --git a/.github/workflows/build-publish.yaml b/.github/workflows/build-publish.yaml index 6680830f..35252a3d 100644 --- a/.github/workflows/build-publish.yaml +++ b/.github/workflows/build-publish.yaml @@ -28,7 +28,7 @@ jobs: python -m pip install pyyaml - name: Create ${{ matrix.py_version }} addon.xml - run: python build.py --version ${{ matrix.py_version }} + run: python .build/build.py --version ${{ matrix.py_version }} --source . --target . - name: Publish Build Artifact uses: actions/upload-artifact@v2 @@ -53,8 +53,8 @@ jobs: - name: Upload to repo server uses: burnett01/rsync-deployments@4.1 with: - switches: -rltgoDzvO --delete --exclude='*' --include='**/*.apk' --include='*.txt' - path: plugin.video.jellyfin-${{ matrix.py_version }}.zip + switches: -vrptz + path: '*.zip' remote_path: /srv/repository/incoming/kodi remote_host: ${{ secrets.DEPLOY_HOST }} remote_user: ${{ secrets.DEPLOY_USER }} @@ -69,5 +69,5 @@ jobs: envs: JELLYFIN_VERSION script_stop: true script: | - python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.jellyfin-${{ matrix.py_version }}.zip --datadir /srv/repository/releases/client/kodi/${{ matrix.py_version }}; - rm /srv/repository/incoming/kodi/plugin.video.jellyfin-${{ matrix.py_version }}.zip; + python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.jellyfin+${{ matrix.py_version }}.zip --datadir /srv/repository/releases/client/kodi/${{ matrix.py_version }}; + rm /srv/repository/incoming/kodi/plugin.video.jellyfin+${{ matrix.py_version }}.zip; diff --git a/tox.ini b/tox.ini index fdb7a179..2001112e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [flake8] max-line-length = 9999 import-order-style = pep8 -exclude = ./.git,./.vscode,./libraries +exclude = .git,.vscode,.build,libraries extend-ignore = I202 per-file-ignores = @@ -19,7 +19,6 @@ source = context_play.py default.py service.py - .config/generate_xml.py omit = tests/* branch = True command_line = -m pytest --junitxml=test.xml