Add settings for testing with travis
This commit is contained in:
@@ -21,6 +21,9 @@ class WOUpdateController(CementBaseController):
|
|||||||
arguments = [
|
arguments = [
|
||||||
(['--force'],
|
(['--force'],
|
||||||
dict(help='Force WordOps update', action='store_true')),
|
dict(help='Force WordOps update', action='store_true')),
|
||||||
|
(['--travis'],
|
||||||
|
dict(help='Argument used only for WordOps development',
|
||||||
|
action='store_true')),
|
||||||
]
|
]
|
||||||
usage = "wo update [options]"
|
usage = "wo update [options]"
|
||||||
|
|
||||||
@@ -28,7 +31,7 @@ class WOUpdateController(CementBaseController):
|
|||||||
def default(self):
|
def default(self):
|
||||||
filename = "woupdate" + time.strftime("%Y%m%d-%H%M%S")
|
filename = "woupdate" + time.strftime("%Y%m%d-%H%M%S")
|
||||||
WODownload.download(self, [["https://raw.githubusercontent.com/"
|
WODownload.download(self, [["https://raw.githubusercontent.com/"
|
||||||
"WordOps/WordOps/master/install",
|
"WordOps/WordOps/updating-configuration/install",
|
||||||
"/tmp/{0}".format(filename),
|
"/tmp/{0}".format(filename),
|
||||||
"update script"]])
|
"update script"]])
|
||||||
if self.app.pargs.force:
|
if self.app.pargs.force:
|
||||||
@@ -45,6 +48,10 @@ class WOUpdateController(CementBaseController):
|
|||||||
except OSError as e:
|
except OSError as e:
|
||||||
Log.debug(self, str(e))
|
Log.debug(self, str(e))
|
||||||
Log.error(self, "WordOps update failed !")
|
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):
|
def load(app):
|
||||||
|
|||||||
Reference in New Issue
Block a user