forked from michael.heier/citadel-core
Allow downloading new apps
This commit is contained in:
parent
a4078eb6c2
commit
3d3556f4b7
|
@ -65,8 +65,13 @@ def getAppYml(name):
|
|||
with open(os.path.join(appsDir, "sourceMap.json"), "r") as f:
|
||||
sourceMap = json.load(f)
|
||||
if not name in sourceMap:
|
||||
print("Warning: App {} can't be updated because it is not in the source map".format(name))
|
||||
return False
|
||||
print("Warning: App {} is not in the source map".format(name))
|
||||
sourceMap = {
|
||||
name: {
|
||||
"githubRepo": "runcitadel/core",
|
||||
"branch": "v2"
|
||||
}
|
||||
}
|
||||
url = 'https://raw.githubusercontent.com/{}/{}/apps/{}/app.yml'.format(sourceMap[name]["githubRepo"], sourceMap[name]["branch"], name)
|
||||
response = requests.get(url)
|
||||
if response.status_code == 200:
|
||||
|
|
Loading…
Reference in New Issue
Block a user