Skip to content

Commit b7ca731

Browse files
committed
Merge branch 'master' into stable
2 parents c436eb4 + ed3532a commit b7ca731

File tree

6 files changed

+58
-3
lines changed

6 files changed

+58
-3
lines changed

CHANGELOG.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v 3.0.6 - April 2,2015
2+
- Added `update` command to update EasyEngine.
3+
14
v 3.0.5 - March 18,2015
25
- Changed Database from Percona MySQL to MariaDB #362
36
- Better arguments for ee debug command

config/ee.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,10 @@ password =
6767

6868
### EMail for WordPress sites
6969
email =
70+
71+
[update]
72+
73+
### If enabled, load a plugin named `update` either from the Python module
74+
### `ee.cli.plugins.example` or from the file path
75+
### `/var/lib/ee/plugins/example.py`
76+
enable_plugin = true

ee/cli/plugins/update.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
from cement.core.controller import CementBaseController, expose
2+
from cement.core import handler, hook
3+
from ee.core.download import EEDownload
4+
from ee.core.logging import Log
5+
import time
6+
import os
7+
8+
9+
def ee_update_hook(app):
10+
# do something with the ``app`` object here.
11+
pass
12+
13+
14+
class EEUpdateController(CementBaseController):
15+
class Meta:
16+
label = 'ee_update'
17+
stacked_on = 'base'
18+
aliases = ['update']
19+
aliases_only = True
20+
stacked_type = 'nested'
21+
description = ('update EasyEngine to latest version')
22+
usage = "ee update"
23+
24+
@expose(hide=True)
25+
def default(self):
26+
filename = "eeupdate" + time.strftime("%Y%m%d-%H%M%S")
27+
EEDownload.download(self, [["http://rt.cx/eeup",
28+
"/tmp/{0}".format(filename),
29+
"update script"]])
30+
try:
31+
Log.info(self, "updating EasyEngine, please wait ...")
32+
os.system("bash /tmp/{0}".format(filename))
33+
except OSError as e:
34+
Log.debug(self, str(e))
35+
Log.error(self, "EasyEngine update failed !")
36+
except Exception as e:
37+
Log.debug(self, str(e))
38+
Log.error(self, "EasyEngine update failed !")
39+
40+
41+
def load(app):
42+
# register the plugin class.. this only happens if the plugin is enabled
43+
handler.register(EEUpdateController)
44+
# register a hook (function) to run after arguments are parsed.
45+
hook.register('post_argument_parsing', ee_update_hook)

ee/core/variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class EEVariables():
1212
"""Intialization of core variables"""
1313

1414
# EasyEngine version
15-
ee_version = "3.0.5"
15+
ee_version = "3.0.6"
1616

1717
# EasyEngine packages versions
1818
ee_wp_cli = "0.18.0"

install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fi
4848
# Define variables for later use
4949
ee_branch=$1
5050
readonly ee_version_old="2.2.3"
51-
readonly ee_version_new="3.0.5"
51+
readonly ee_version_new="3.0.6"
5252
readonly ee_log_dir=/var/log/ee/
5353
readonly ee_install_log=/var/log/ee/install.log
5454
readonly ee_linux_distro=$(lsb_release -i | awk '{print $3}')

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
os.system("git config --global user.email {0}".format(ee_email))
5555

5656
setup(name='ee',
57-
version='3.0.5',
57+
version='3.0.6',
5858
description=long_description,
5959
long_description=long_description,
6060
classifiers=[],

0 commit comments

Comments
 (0)