Browse Source

Merge branch 'hotfix/v3.3.12'

hotfix/v3.3.14 v3.3.12
Prabuddha Chakraborty 9 years ago
parent
commit
a0b81ea8dd
  1. 4
      CHANGELOG.txt
  2. 4
      ee/cli/plugins/site.py
  3. 18
      ee/cli/plugins/site_functions.py
  4. 27
      ee/core/fileutils.py
  5. 4
      ee/core/variables.py
  6. 2
      install
  7. 2
      setup.py

4
CHANGELOG.txt

@ -1,3 +1,7 @@
v 3.3.12 - Nov 3, 2015
- Fix #637
- Updated wp-cli version
v 3.3.11 - Oct 26, 2015
- Updated MySql version
- Added new repository for MySql

4
ee/cli/plugins/site.py

@ -1013,7 +1013,7 @@ class EESiteUpdateController(CementBaseController):
Log.info(self, "Pagespeed is already disabled for given "
"site")
elif pagespeed is True:
Log.info(self, "Pagespeed is allready enabled for given "
Log.info(self, "Pagespeed is already enabled for given "
"site")
pargs.pagespeed = False
@ -1120,6 +1120,8 @@ class EESiteUpdateController(CementBaseController):
Log.debug(self, str(e))
Log.error(self, "NGINX configuration check failed.")
data['old_pagespeed_status'] = check_site.is_pagespeed
try:
sitebackup(self, data)
except Exception as e:

18
ee/cli/plugins/site_functions.py

@ -605,7 +605,7 @@ def setwebrootpermissions(self, webroot):
EEVariables.ee_php_user, recursive=True)
except Exception as e:
Log.debug(self, str(e))
raise SiteError("problem occured while settingup webroot permissions")
raise SiteError("problem occured while setting up webroot permissions")
def sitebackup(self, data):
@ -618,9 +618,14 @@ def sitebackup(self, data):
.format(data['site_name']), backup_path)
if data['currsitetype'] in ['html', 'php', 'proxy', 'mysql']:
Log.info(self, "Backing up Webroot \t\t", end='')
EEFileUtils.mvfile(self, ee_site_webroot + '/htdocs', backup_path)
Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]")
if (data['pagespeed'] is True or data['old_pagespeed_status'] is True) and not data['wp']:
Log.info(self, "Backing up Webroot \t\t", end='')
EEFileUtils.copyfiles(self, ee_site_webroot + '/htdocs', backup_path + '/htdocs')
Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]")
else:
Log.info(self, "Backing up Webroot \t\t", end='')
EEFileUtils.mvfile(self, ee_site_webroot + '/htdocs', backup_path)
Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]")
configfiles = glob.glob(ee_site_webroot + '/*-config.php')
if not configfiles:
@ -653,7 +658,10 @@ def sitebackup(self, data):
Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]")
# move wp-config.php/ee-config.php to backup
if data['currsitetype'] in ['mysql', 'proxy']:
EEFileUtils.mvfile(self, configfiles[0], backup_path)
if (data['pagespeed'] is True or data['old_pagespeed_status'] is True) and not data['wp']:
EEFileUtils.copyfile(self, configfiles[0], backup_path)
else:
EEFileUtils.mvfile(self, configfiles[0], backup_path)
else:
EEFileUtils.copyfile(self, configfiles[0], backup_path)

27
ee/core/fileutils.py

@ -62,11 +62,34 @@ class EEFileUtils():
Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to reomove symbolic link ...\n")
def copyfile(self, src, dest):
def copyfiles(self, src, dest):
"""
Copies files:
src : source path
dest : destination path
Recursively copy an entire directory tree rooted at src.
The destination directory, named by dst, must not already exist;
it will be created as well as missing parent directories.
"""
try:
Log.debug(self, "Copying files, Source:{0}, Dest:{1}"
.format(src, dest))
shutil.copytree(src, dest)
except shutil.Error as e:
Log.debug(self, "{0}".format(e))
Log.error(self, 'Unable to copy files from {0} to {1}'
.format(src, dest))
except IOError as e:
Log.debug(self, "{0}".format(e.strerror))
Log.error(self, "Unable to copy files from {0} to {1}"
.format(src, dest))
def copyfile(self, src, dest):
"""
Copy file:
src : source path
dest : destination path
"""
try:
Log.debug(self, "Copying file, Source:{0}, Dest:{1}"
@ -77,7 +100,7 @@ class EEFileUtils():
Log.error(self, 'Unable to copy file from {0} to {1}'
.format(src, dest))
except IOError as e:
Log.debug(self, "{e}".format(e.strerror))
Log.debug(self, "{0}".format(e.strerror))
Log.error(self, "Unable to copy file from {0} to {1}"
.format(src, dest))

4
ee/core/variables.py

@ -12,11 +12,11 @@ class EEVariables():
"""Intialization of core variables"""
# EasyEngine version
ee_version = "3.3.11"
ee_version = "3.3.12"
# EasyEngine packages versions
ee_wp_cli = "0.20.2"
ee_wp_cli = "0.20.3"
ee_adminer = "4.2.1"
ee_roundcube = "1.1.3"
ee_vimbadmin = "3.0.12"

2
install

@ -48,7 +48,7 @@ fi
# Define variables for later use
ee_branch=$1
readonly ee_version_old="2.2.3"
readonly ee_version_new="3.3.11"
readonly ee_version_new="3.3.12"
readonly ee_log_dir=/var/log/ee/
readonly ee_install_log=/var/log/ee/install.log
readonly ee_linux_distro=$(lsb_release -i | awk '{print $3}')

2
setup.py

@ -54,7 +54,7 @@ except Exception as e:
os.system("git config --global user.email {0}".format(ee_email))
setup(name='ee',
version='3.3.11',
version='3.3.12',
description=long_description,
long_description=long_description,
classifiers=[],

Loading…
Cancel
Save