Merge pull request #279 from WordOps/updating-configuration

v3.12.0 release
This commit is contained in:
VirtuBox
2020-05-13 15:13:51 +02:00
committed by GitHub
20 changed files with 309 additions and 171 deletions

View File

@@ -36,7 +36,7 @@ class WODownload():
return False
return 0
def latest_release(self, repository):
def latest_release(self, repository, name=False):
"""Get the latest release number of a GitHub repository.\n
repository format should be: \"user/repo\""""
try:
@@ -48,5 +48,19 @@ class WODownload():
except requests.RequestException as e:
Log.debug(self, str(e))
Log.error(self, "Unable to query GitHub API")
if name:
return github_json["name"]
else:
return github_json["tag_name"]
return github_json["tag_name"]
def pma_release(self):
"""Get the latest phpmyadmin release number from a json file"""
try:
req = requests.get(
'https://www.phpmyadmin.net/home_page/version.json',
timeout=(5, 30))
pma_json = req.json()
except requests.RequestException as e:
Log.debug(self, str(e))
Log.error(self, "Unable to query phpmyadmin API")
return pma_json["version"]

View File

@@ -31,9 +31,8 @@ class WOMysql():
# Makes connection with MySQL server
try:
if os.path.exists('/etc/mysql/conf.d/my.cnf'):
connection = \
pymysql.connect(read_default_file='/etc/mysql/'
'conf.d/my.cnf')
connection = pymysql.connect(
read_default_file='/etc/mysql/conf.d/my.cnf')
else:
connection = pymysql.connect(read_default_file='~/.my.cnf')
return connection

View File

@@ -14,11 +14,11 @@ class WOVar():
"""Intialization of core variables"""
# WordOps version
wo_version = "3.11.4"
wo_version = "3.12.0"
# WordOps packages versions
wo_wp_cli = "2.4.0"
wo_adminer = "4.7.5"
wo_phpmyadmin = "5.0.1"
wo_phpmyadmin = "5.0.2"
wo_extplorer = "2.1.13"
wo_dashboard = "1.2"
@@ -140,18 +140,22 @@ class WOVar():
"zip", "xml", "soap"]
wo_php72 = []
for module in wo_module:
wo_php72 = wo_php72 + ["php7.2-{0}".format(module),
"php7.2-recode"]
wo_php72 = wo_php72 + ["php7.2-{0}".format(module)]
wo_php72 = wo_php72 + ["php7.2-recode"]
wo_php73 = []
for module in wo_module:
wo_php73 = wo_php73 + ["php7.3-{0}".format(module),
"php7.3-recode"]
wo_php73 = wo_php73 + ["php7.3-{0}".format(module)]
wo_php73 = wo_php73 + ["php7.3-recode"]
wo_php74 = []
for module in wo_module:
wo_php74 = wo_php74 + ["php7.4-{0}".format(module)]
wo_php_extra = ["php-memcached", "php-imagick", "php-igbinary",
"graphviz", "php-xdebug", "php-msgpack", "php-redis"]
if not wo_platform_codename == 'focal':
wo_php_extra = ["php-memcached", "php-imagick", "php-igbinary",
"graphviz", "php-xdebug", "php-msgpack", "php-redis"]
else:
wo_php_extra = ["php-imagick", "php-igbinary",
"graphviz", "php-xdebug", "php-msgpack", "php-redis"]
wo_mysql = ["mariadb-server", "percona-toolkit"]
if wo_distro == 'raspbian':