Fix MariaDB upgrade on Github actions

This commit is contained in:
VirtuBox
2020-10-28 12:25:09 +01:00
parent 164f817d25
commit 7d0b0cd50c
3 changed files with 31 additions and 8 deletions

View File

@@ -30,7 +30,7 @@ class WOStackMigrateController(CementBaseController):
]
@expose(hide=True)
def migrate_mariadb(self):
def migrate_mariadb(self, ci=False):
# Backup all database
WOMysql.backupAll(self, fulldump=True)
@@ -57,7 +57,7 @@ class WOStackMigrateController(CementBaseController):
WOAptGet.remove(self, ["mariadb-server"])
WOAptGet.auto_remove(self)
WOAptGet.install(self, WOVar.wo_mysql)
if not self.app.args.ci:
if not ci:
WOAptGet.dist_upgrade(self)
WOAptGet.auto_remove(self)
Log.valide(self, "Upgrading MariaDB ")
@@ -91,7 +91,10 @@ class WOStackMigrateController(CementBaseController):
start_upgrade = input("Do you want to continue:[y/N]")
if start_upgrade != "Y" and start_upgrade != "y":
Log.error(self, "Not starting package update")
self.migrate_mariadb()
if not pargs.ci:
self.migrate_mariadb()
else:
self.migrate_mariadb(ci=True)
else:
Log.error(self, "Your current MySQL is not alive or "
"you allready installed MariaDB")