From 628a0c4bca60c98b8d32115ee0ce1aa3e25d1db8 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 17 Jun 2019 11:44:46 +0200 Subject: [PATCH] Add settings for testing with travis --- wo/cli/plugins/update.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wo/cli/plugins/update.py b/wo/cli/plugins/update.py index 07214e7..53e741f 100644 --- a/wo/cli/plugins/update.py +++ b/wo/cli/plugins/update.py @@ -21,6 +21,9 @@ class WOUpdateController(CementBaseController): arguments = [ (['--force'], dict(help='Force WordOps update', action='store_true')), + (['--travis'], + dict(help='Argument used only for WordOps development', + action='store_true')), ] usage = "wo update [options]" @@ -28,7 +31,7 @@ class WOUpdateController(CementBaseController): def default(self): filename = "woupdate" + time.strftime("%Y%m%d-%H%M%S") WODownload.download(self, [["https://raw.githubusercontent.com/" - "WordOps/WordOps/master/install", + "WordOps/WordOps/updating-configuration/install", "/tmp/{0}".format(filename), "update script"]]) if self.app.pargs.force: @@ -45,6 +48,10 @@ class WOUpdateController(CementBaseController): except OSError as e: Log.debug(self, str(e)) Log.error(self, "WordOps update failed !") + if self.app.pargs.travis: + try: + Log.info(self, "updating WordOps, please wait...") + os.system("bash /tmp/{0} --travis --force".format(filename)) def load(app):