mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
commit
a3e121cc13
3 changed files with 74 additions and 40 deletions
|
@ -93,7 +93,7 @@
|
||||||
},
|
},
|
||||||
"borg": {
|
"borg": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 2,
|
"level": 7,
|
||||||
"revision": "HEAD",
|
"revision": "HEAD",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/borg_ynh"
|
"url": "https://github.com/YunoHost-Apps/borg_ynh"
|
||||||
|
@ -127,6 +127,12 @@
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/cachet_ynh"
|
"url": "https://github.com/YunoHost-Apps/cachet_ynh"
|
||||||
},
|
},
|
||||||
|
"calibreweb": {
|
||||||
|
"branch": "master",
|
||||||
|
"revision": "HEAD",
|
||||||
|
"state": "inprogress",
|
||||||
|
"url": "https://github.com/YunoHost-Apps/calibre_ynh"
|
||||||
|
},
|
||||||
"cesium": {
|
"cesium": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 3,
|
"level": 3,
|
||||||
|
@ -200,8 +206,7 @@
|
||||||
},
|
},
|
||||||
"cowyo": {
|
"cowyo": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 2,
|
"revision": "HEAD",
|
||||||
"revision": "0ce8a8c89a42f08f82667d7764851762db55557a",
|
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/cowyo_ynh"
|
"url": "https://github.com/YunoHost-Apps/cowyo_ynh"
|
||||||
},
|
},
|
||||||
|
@ -578,7 +583,7 @@
|
||||||
},
|
},
|
||||||
"halcyon": {
|
"halcyon": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 6,
|
"level": 0,
|
||||||
"revision": "HEAD",
|
"revision": "HEAD",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/halcyon_ynh"
|
"url": "https://github.com/YunoHost-Apps/halcyon_ynh"
|
||||||
|
@ -771,6 +776,13 @@
|
||||||
"state": "notworking",
|
"state": "notworking",
|
||||||
"url": "https://github.com/Yunohost-Apps/lektor_ynh"
|
"url": "https://github.com/Yunohost-Apps/lektor_ynh"
|
||||||
},
|
},
|
||||||
|
"libreerp": {
|
||||||
|
"branch": "master",
|
||||||
|
"level": 0,
|
||||||
|
"revision": "HEAD",
|
||||||
|
"state": "working",
|
||||||
|
"url": "https://github.com/Yunohost-Apps/libreerp_ynh"
|
||||||
|
},
|
||||||
"libresonic": {
|
"libresonic": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 1,
|
"level": 1,
|
||||||
|
@ -1053,13 +1065,6 @@
|
||||||
"state": "inprogress",
|
"state": "inprogress",
|
||||||
"url": "https://github.com/YunoHost-Apps/nodebb_ynh"
|
"url": "https://github.com/YunoHost-Apps/nodebb_ynh"
|
||||||
},
|
},
|
||||||
"odoo": {
|
|
||||||
"branch": "master",
|
|
||||||
"level": 0,
|
|
||||||
"revision": "HEAD",
|
|
||||||
"state": "inprogress",
|
|
||||||
"url": "https://github.com/Yunohost-Apps/odoo_ynh"
|
|
||||||
},
|
|
||||||
"ofbiz": {
|
"ofbiz": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 0,
|
"level": 0,
|
||||||
|
@ -1070,7 +1075,6 @@
|
||||||
},
|
},
|
||||||
"onlyoffice": {
|
"onlyoffice": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 3,
|
|
||||||
"revision": "9eee4dcb9f7602247981b4ba2a7ca7ab12634c26",
|
"revision": "9eee4dcb9f7602247981b4ba2a7ca7ab12634c26",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/onlyoffice_ynh"
|
"url": "https://github.com/YunoHost-Apps/onlyoffice_ynh"
|
||||||
|
@ -1203,6 +1207,7 @@
|
||||||
},
|
},
|
||||||
"pilea": {
|
"pilea": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
|
"level": 2,
|
||||||
"revision": "3d09ad6f50ee55dde58c36adb5c369bf314d9edf",
|
"revision": "3d09ad6f50ee55dde58c36adb5c369bf314d9edf",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/SimonMellerin/pilea_ynh/"
|
"url": "https://github.com/SimonMellerin/pilea_ynh/"
|
||||||
|
@ -1245,7 +1250,7 @@
|
||||||
},
|
},
|
||||||
"plume": {
|
"plume": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 3,
|
"level": 0,
|
||||||
"revision": "HEAD",
|
"revision": "HEAD",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/plume_ynh"
|
"url": "https://github.com/YunoHost-Apps/plume_ynh"
|
||||||
|
@ -1399,7 +1404,7 @@
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 0,
|
"level": 0,
|
||||||
"revision": "HEAD",
|
"revision": "HEAD",
|
||||||
"state": "inprogress",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-apps/shsd_ynh"
|
"url": "https://github.com/YunoHost-apps/shsd_ynh"
|
||||||
},
|
},
|
||||||
"shuri": {
|
"shuri": {
|
||||||
|
@ -1669,9 +1674,9 @@
|
||||||
},
|
},
|
||||||
"wekan": {
|
"wekan": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 0,
|
"level": 3,
|
||||||
"revision": "HEAD",
|
"revision": "HEAD",
|
||||||
"state": "inprogress",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/wekan_ynh"
|
"url": "https://github.com/YunoHost-Apps/wekan_ynh"
|
||||||
},
|
},
|
||||||
"wemawema": {
|
"wemawema": {
|
||||||
|
@ -1737,12 +1742,6 @@
|
||||||
"revision": "795449cb43ccdba949c814746d6ea90eee0a7259",
|
"revision": "795449cb43ccdba949c814746d6ea90eee0a7259",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/aymhce/yunohost_ynh"
|
"url": "https://github.com/aymhce/yunohost_ynh"
|
||||||
},
|
|
||||||
"zabbix": {
|
|
||||||
"branch": "master",
|
|
||||||
"revision": "9386c5b2",
|
|
||||||
"state": "inprogress",
|
|
||||||
"url": "https://framagit.org/Mickael-Martin/zabbix_ynh"
|
|
||||||
},
|
},
|
||||||
"z-push": {
|
"z-push": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
|
@ -1752,9 +1751,15 @@
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/z-push_ynh"
|
"url": "https://github.com/YunoHost-Apps/z-push_ynh"
|
||||||
},
|
},
|
||||||
|
"zabbix": {
|
||||||
|
"branch": "master",
|
||||||
|
"revision": "9386c5b2",
|
||||||
|
"state": "inprogress",
|
||||||
|
"url": "https://framagit.org/Mickael-Martin/zabbix_ynh"
|
||||||
|
},
|
||||||
"zeronet": {
|
"zeronet": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 2,
|
"level": 7,
|
||||||
"revision": "1a77591a8dffdc4bcfd297a9340e98e0e6775865",
|
"revision": "1a77591a8dffdc4bcfd297a9340e98e0e6775865",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/zeronet_ynh"
|
"url": "https://github.com/YunoHost-Apps/zeronet_ynh"
|
||||||
|
|
|
@ -13,11 +13,6 @@ from dateutil.parser import parse
|
||||||
|
|
||||||
# Regular expression patterns
|
# Regular expression patterns
|
||||||
|
|
||||||
"""GitHub repository URL."""
|
|
||||||
re_github_repo = re.compile(
|
|
||||||
r'^(http[s]?|git)://github.com/(?P<owner>[\w\-_]+)/(?P<repo>[\w\-_]+)(.git)?'
|
|
||||||
)
|
|
||||||
|
|
||||||
re_commit_author = re.compile(
|
re_commit_author = re.compile(
|
||||||
r'^author (?P<name>.+) <(?P<email>.+)> (?P<time>\d+) (?P<tz>[+-]\d+)$',
|
r'^author (?P<name>.+) <(?P<email>.+)> (?P<time>\d+) (?P<tz>[+-]\d+)$',
|
||||||
re.MULTILINE
|
re.MULTILINE
|
||||||
|
@ -151,7 +146,18 @@ for app, info in apps_list.items():
|
||||||
app_level = info.get("level")
|
app_level = info.get("level")
|
||||||
app_maintained = info.get("maintained", True)
|
app_maintained = info.get("maintained", True)
|
||||||
|
|
||||||
github_repo = re_github_repo.match(app_url)
|
forge_site = app_url.split('/')[2]
|
||||||
|
owner = app_url.split('/')[3]
|
||||||
|
repo = app_url.split('/')[4]
|
||||||
|
if forge_site == "github.com":
|
||||||
|
forge_type = "github"
|
||||||
|
elif forge_site == "framagit.org":
|
||||||
|
forge_type = "gitlab"
|
||||||
|
elif forge_site == "code.ffdn.org":
|
||||||
|
forge_type = "gogs"
|
||||||
|
else:
|
||||||
|
forge_type = "unknown"
|
||||||
|
|
||||||
previous_state = already_built_file.get(app, {}).get("state", {})
|
previous_state = already_built_file.get(app, {}).get("state", {})
|
||||||
|
|
||||||
manifest = {}
|
manifest = {}
|
||||||
|
@ -162,14 +168,11 @@ for app, info in apps_list.items():
|
||||||
previous_level = already_built_file.get(app, {}).get("level")
|
previous_level = already_built_file.get(app, {}).get("level")
|
||||||
previous_maintained = already_built_file.get(app, {}).get("maintained")
|
previous_maintained = already_built_file.get(app, {}).get("maintained")
|
||||||
|
|
||||||
if github_repo and app_rev == "HEAD":
|
if forge_type == "github" and app_rev == "HEAD":
|
||||||
|
|
||||||
if previous_rev is None:
|
if previous_rev is None:
|
||||||
previous_rev = 'HEAD'
|
previous_rev = 'HEAD'
|
||||||
|
|
||||||
owner = github_repo.group('owner')
|
|
||||||
repo = github_repo.group('repo')
|
|
||||||
|
|
||||||
url = "https://api.github.com/repos/{}/{}/git/refs/heads/{}".format(owner, repo, app_branch)
|
url = "https://api.github.com/repos/{}/{}/git/refs/heads/{}".format(owner, repo, app_branch)
|
||||||
head = get_json(url)
|
head = get_json(url)
|
||||||
app_rev = head["object"]["sha"]
|
app_rev = head["object"]["sha"]
|
||||||
|
@ -206,7 +209,7 @@ for app, info in apps_list.items():
|
||||||
print("... but has changed of level, updating it from '%s' to '%s'" % (previous_level, app_level))
|
print("... but has changed of level, updating it from '%s' to '%s'" % (previous_level, app_level))
|
||||||
if previous_maintained != app_maintained:
|
if previous_maintained != app_maintained:
|
||||||
result_dict[app]["maintained"] = app_maintained
|
result_dict[app]["maintained"] = app_maintained
|
||||||
print("... but maintained status changed, updatinng it from '%s' to '%s'" % (previous_maintained, app_maintained))
|
print("... but maintained status changed, updating it from '%s' to '%s'" % (previous_maintained, app_maintained))
|
||||||
|
|
||||||
print "update translations but don't download anything"
|
print "update translations but don't download anything"
|
||||||
result_dict[app]['manifest'] = include_translations_in_manifest(app, result_dict[app]['manifest'])
|
result_dict[app]['manifest'] = include_translations_in_manifest(app, result_dict[app]['manifest'])
|
||||||
|
@ -216,9 +219,7 @@ for app, info in apps_list.items():
|
||||||
print("Revision changed ! Updating...")
|
print("Revision changed ! Updating...")
|
||||||
|
|
||||||
# Hosted on GitHub
|
# Hosted on GitHub
|
||||||
if github_repo:
|
if forge_type == "github":
|
||||||
owner = github_repo.group('owner')
|
|
||||||
repo = github_repo.group('repo')
|
|
||||||
|
|
||||||
raw_url = 'https://raw.githubusercontent.com/%s/%s/%s/manifest.json' % (
|
raw_url = 'https://raw.githubusercontent.com/%s/%s/%s/manifest.json' % (
|
||||||
owner, repo, app_rev
|
owner, repo, app_rev
|
||||||
|
@ -239,8 +240,24 @@ for app, info in apps_list.items():
|
||||||
commit_date = parse(info2['commit']['author']['date'])
|
commit_date = parse(info2['commit']['author']['date'])
|
||||||
timestamp = int(time.mktime(commit_date.timetuple()))
|
timestamp = int(time.mktime(commit_date.timetuple()))
|
||||||
|
|
||||||
# Git repository with HTTP/HTTPS (Gogs, GitLab, ...)
|
# Gitlab-type forge
|
||||||
elif app_url.startswith('http'):
|
elif forge_type == "gitlab":
|
||||||
|
|
||||||
|
raw_url = '%s/raw/%s/manifest.json' % (app_url, app_rev)
|
||||||
|
manifest = get_json(raw_url, verify=True)
|
||||||
|
if manifest is None:
|
||||||
|
continue
|
||||||
|
|
||||||
|
api_url = 'https://%s/api/v4/projects/%s%%2F%s/repository/commits/%s' % (forge_site, owner, repo, app_rev)
|
||||||
|
commit = get_json(api_url)
|
||||||
|
if commit is None:
|
||||||
|
continue
|
||||||
|
|
||||||
|
commit_date = parse(commit["authored_date"])
|
||||||
|
timestamp = int(time.mktime(commit_date.timetuple()))
|
||||||
|
|
||||||
|
# Gogs-type forge
|
||||||
|
elif forge_type == "gogs":
|
||||||
if not app_url.endswith('.git'):
|
if not app_url.endswith('.git'):
|
||||||
app_url += ".git"
|
app_url += ".git"
|
||||||
|
|
||||||
|
@ -284,6 +301,12 @@ for app, info in apps_list.items():
|
||||||
print("-> Error: unsupported VCS and/or protocol")
|
print("-> Error: unsupported VCS and/or protocol")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if manifest["id"] != app or manifest["id"] != repo.replace("_ynh", ""):
|
||||||
|
print("Warning: IDs different between community.json, manifest and repo name")
|
||||||
|
print(" Manifest id : %s" % manifest["id"])
|
||||||
|
print(" Name in community json : %s" % app)
|
||||||
|
print(" Repo name : %s" % repo.replace("_ynh", ""))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result_dict[manifest['id']] = {
|
result_dict[manifest['id']] = {
|
||||||
'git': {
|
'git': {
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
"couchpotato_manifest_description": "Automatic movie downloader",
|
"couchpotato_manifest_description": "Automatic movie downloader",
|
||||||
"cowyo_manifest_arguments_install_domain": "Choose a domain name dedicated to cowyo",
|
"cowyo_manifest_arguments_install_domain": "Choose a domain name dedicated to cowyo",
|
||||||
"cowyo_manifest_arguments_install_is_public": "Is it a public application?",
|
"cowyo_manifest_arguments_install_is_public": "Is it a public application?",
|
||||||
"cowyo_manifest_description": "A feature-rich wiki webserver for minimalists, packaged for YunoHost",
|
"cowyo_manifest_description": "A feature-rich wiki webserver for minimalists.",
|
||||||
"cryptpad_manifest_arguments_install_domain": "Choose a domain name for CryptPad",
|
"cryptpad_manifest_arguments_install_domain": "Choose a domain name for CryptPad",
|
||||||
"cryptpad_manifest_arguments_install_is_public": "Is it a public site? ",
|
"cryptpad_manifest_arguments_install_is_public": "Is it a public site? ",
|
||||||
"cryptpad_manifest_arguments_install_path": "Choose a path for CryptPad, only / is allowed.",
|
"cryptpad_manifest_arguments_install_path": "Choose a path for CryptPad, only / is allowed.",
|
||||||
|
@ -212,6 +212,7 @@
|
||||||
"dynette_manifest_description": "Dynette is a dyndns server",
|
"dynette_manifest_description": "Dynette is a dyndns server",
|
||||||
"emailpoubelle_manifest_arguments_install_admin": "Choose an admin user for emailpoubelle",
|
"emailpoubelle_manifest_arguments_install_admin": "Choose an admin user for emailpoubelle",
|
||||||
"emailpoubelle_manifest_arguments_install_domain": "Choose a domain for emailpoubelle",
|
"emailpoubelle_manifest_arguments_install_domain": "Choose a domain for emailpoubelle",
|
||||||
|
"emailpoubelle_manifest_arguments_install_password": "Enter a password to access the admin panel",
|
||||||
"emailpoubelle_manifest_arguments_install_path": "Choose a path for emailpoubelle",
|
"emailpoubelle_manifest_arguments_install_path": "Choose a path for emailpoubelle",
|
||||||
"emailpoubelle_manifest_arguments_install_public_site": "Should this application be public ?",
|
"emailpoubelle_manifest_arguments_install_public_site": "Should this application be public ?",
|
||||||
"emailpoubelle_manifest_description": "Create throwable email address redirected to your real one",
|
"emailpoubelle_manifest_description": "Create throwable email address redirected to your real one",
|
||||||
|
@ -859,6 +860,11 @@
|
||||||
"pihole_manifest_arguments_install_path": "Choose a path for the admin interface of Pi-hole",
|
"pihole_manifest_arguments_install_path": "Choose a path for the admin interface of Pi-hole",
|
||||||
"pihole_manifest_arguments_install_query_logging": "Do you want to log queries ?",
|
"pihole_manifest_arguments_install_query_logging": "Do you want to log queries ?",
|
||||||
"pihole_manifest_description": "Network-wide ad blocking via your own DNS server.",
|
"pihole_manifest_description": "Network-wide ad blocking via your own DNS server.",
|
||||||
|
"pilea_manifest_arguments_install_admin": "Choose the Pilea administrator",
|
||||||
|
"pilea_manifest_arguments_install_domain": "Choose a domain for Pilea",
|
||||||
|
"pilea_manifest_arguments_install_is_public": "Is it a public website?",
|
||||||
|
"pilea_manifest_arguments_install_path": "Choose a path for Pilea",
|
||||||
|
"pilea_manifest_description": "A little dashboard to analyse your electricity consumption data from Linky & weather",
|
||||||
"piratebox_manifest_arguments_install_domain": "Choose a domain for the web administration",
|
"piratebox_manifest_arguments_install_domain": "Choose a domain for the web administration",
|
||||||
"piratebox_manifest_arguments_install_opt_chat": "Enable the chat? (yes/no)",
|
"piratebox_manifest_arguments_install_opt_chat": "Enable the chat? (yes/no)",
|
||||||
"piratebox_manifest_arguments_install_opt_deleting": "Can users delete files? (yes/no)",
|
"piratebox_manifest_arguments_install_opt_deleting": "Can users delete files? (yes/no)",
|
||||||
|
|
Loading…
Add table
Reference in a new issue