mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Migrate to apps.json
This commit is contained in:
parent
ac6f24671c
commit
5d9a62192f
1 changed files with 27 additions and 0 deletions
27
src/yunohost/data_migrations/0009_migrate_to_apps_json.py
Normal file
27
src/yunohost/data_migrations/0009_migrate_to_apps_json.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
from moulinette.utils.log import getActionLogger
|
||||
from yunohost.app import app_fetchlist, app_removelist
|
||||
from yunohost.tools import Migration
|
||||
|
||||
logger = getActionLogger('yunohost.migration')
|
||||
|
||||
class MyMigration(Migration):
|
||||
|
||||
"Migrate from official.json to apps.json"
|
||||
|
||||
def migrate(self):
|
||||
|
||||
# Remove official.json list
|
||||
app_removelist(name="yunohost")
|
||||
|
||||
# Replace by apps.json list
|
||||
app_fetchlist(name="yunohost",
|
||||
url="https://app.yunohost.org/apps.json")
|
||||
|
||||
def backward(self):
|
||||
|
||||
# Remove apps.json list
|
||||
app_removelist(name="yunohost")
|
||||
|
||||
# Replace by official.json list
|
||||
app_fetchlist(name="yunohost",
|
||||
url="https://app.yunohost.org/official.json")
|
Loading…
Add table
Reference in a new issue