move build.py

This commit is contained in:
h1dden-da3m0n 2021-05-27 23:33:54 +02:00
parent afeb520433
commit 326f00925a
4 changed files with 8 additions and 9 deletions

View file

@ -35,7 +35,7 @@ def create_addon_xml(config: dict, source: str, py_version: str) -> None:
Create addon.xml from template file Create addon.xml from template file
""" """
# Load 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) tree = ET.parse(f)
root = tree.getroot() root = tree.getroot()
@ -92,7 +92,7 @@ def folder_filter(folder_name: str) -> bool:
return ('.ci' not in folder_name return ('.ci' not in folder_name
and '.git' not in folder_name and '.git' not in folder_name
and '.github' 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__': if __name__ == '__main__':

View file

@ -28,7 +28,7 @@ jobs:
python -m pip install pyyaml python -m pip install pyyaml
- name: Create ${{ matrix.py_version }} addon.xml - 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 - name: Publish Build Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -53,8 +53,8 @@ jobs:
- name: Upload to repo server - name: Upload to repo server
uses: burnett01/rsync-deployments@4.1 uses: burnett01/rsync-deployments@4.1
with: with:
switches: -rltgoDzvO --delete --exclude='*' --include='**/*.apk' --include='*.txt' switches: -vrptz
path: plugin.video.jellyfin-${{ matrix.py_version }}.zip path: '*.zip'
remote_path: /srv/repository/incoming/kodi remote_path: /srv/repository/incoming/kodi
remote_host: ${{ secrets.DEPLOY_HOST }} remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }} remote_user: ${{ secrets.DEPLOY_USER }}
@ -69,5 +69,5 @@ jobs:
envs: JELLYFIN_VERSION envs: JELLYFIN_VERSION
script_stop: true script_stop: true
script: | 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 }}; 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; rm /srv/repository/incoming/kodi/plugin.video.jellyfin+${{ matrix.py_version }}.zip;

View file

@ -1,7 +1,7 @@
[flake8] [flake8]
max-line-length = 9999 max-line-length = 9999
import-order-style = pep8 import-order-style = pep8
exclude = ./.git,./.vscode,./libraries exclude = .git,.vscode,.build,libraries
extend-ignore = extend-ignore =
I202 I202
per-file-ignores = per-file-ignores =
@ -19,7 +19,6 @@ source =
context_play.py context_play.py
default.py default.py
service.py service.py
.config/generate_xml.py
omit = tests/* omit = tests/*
branch = True branch = True
command_line = -m pytest --junitxml=test.xml command_line = -m pytest --junitxml=test.xml