Commit 38920087 authored by Philipp Hörist's avatar Philipp Hörist

Remove CI scripts

They are now loaded from the ci repo
parent 333eed68
Pipeline #7027 passed with stages
in 7 minutes and 17 seconds
#!/usr/bin/env python3
import os
import requests
webhook_key = os.environ['APPVEYOR_WEBHOOK_KEY']
branch = os.environ['CI_COMMIT_BRANCH']
url = f'https://ci.appveyor.com/api/git/webhook?id={webhook_key}'
ref = f'refs/heads/{branch}'
with open('appveyor.yml', 'r') as file:
yaml = file.read()
payload = {
'ref': ref,
'repository': {'name': 'Gajim'},
'config': yaml
}
req = requests.post(url, json=payload)
req.raise_for_status()
#!/usr/bin/env python3
import os
import io
import zipfile
import subprocess
import shutil
from pathlib import Path
import requests
PLUGINS = [
'plugin_installer',
]
PLUGINS_BASE_URL = 'https://ftp.gajim.org'
PLUGINS_FOLDER = Path('./gajim/data/plugins')
COMMIT_BRANCH = os.environ['CI_COMMIT_BRANCH']
def get_plugins_folder():
if COMMIT_BRANCH == 'master':
return 'plugins_master_zip'
version = COMMIT_BRANCH.split('_')[1]
return f'plugins_{version}_zip'
def get_plugins_url(plugin):
folder = get_plugins_folder()
return f'{PLUGINS_BASE_URL}/{folder}/{plugin}.zip'
def extraxt_zip(zip_bytes, path):
print('Extract to', path)
with zipfile.ZipFile(io.BytesIO(zip_bytes)) as zip_file:
zip_file.extractall(path)
def download_plugins():
PLUGINS_FOLDER.mkdir(parents=True)
for plugin in PLUGINS:
url = get_plugins_url(plugin)
print('Download', url)
req = requests.get(url)
req.raise_for_status()
extraxt_zip(req.content, PLUGINS_FOLDER)
def setup():
print('Setup')
subprocess.call(['python3', 'setup.py', 'sdist'])
def cleanup():
print('Cleanup')
shutil.rmtree(PLUGINS_FOLDER)
download_plugins()
setup()
cleanup()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment