plugin python script

This commit is contained in:
vabene1111
2025-08-21 18:12:45 +02:00
parent 96a520b1af
commit 981353380c
2 changed files with 20 additions and 5 deletions

19
plugin.py Normal file
View File

@@ -0,0 +1,19 @@
import os
import subprocess
import traceback
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
PLUGINS_DIRECTORY = os.path.join(BASE_DIR, 'recipes', 'plugins')
if os.path.isdir(PLUGINS_DIRECTORY):
for d in os.listdir(PLUGINS_DIRECTORY):
if d != '__pycache__':
try:
subprocess.run(['python', 'setup_repo.py'], shell=True, cwd=os.path.join(BASE_DIR, 'recipes', 'plugins', d))
except Exception:
traceback.print_exc()
print(f'ERROR failed to link plugin {d}')
subprocess.run(['npm', 'install', '--global', 'yarn'], shell=True, cwd=os.path.join(BASE_DIR, 'vue3'))
subprocess.run(['yarn', 'install'], shell=True, cwd=os.path.join(BASE_DIR, 'vue3'))
subprocess.run(['yarn', 'build'], shell=True, cwd=os.path.join(BASE_DIR, 'vue3'))