Commit 5fcc387e authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/10.0.14'

parents 268be296 68bfea0b
......@@ -2,8 +2,14 @@
 
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
 
#### [10.0.14](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.13...10.0.14)
- Refactored app updating for source [`9d7a3f8`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/9d7a3f8bf832152bdfed6eb10f71c7d18d5f7c10)
#### [10.0.13](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.12...10.0.13)
 
> 28 July 2021
#### [10.0.12](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.11...10.0.12)
 
> 28 July 2021
......
{
"name": "sickrage",
"version": "10.0.13",
"version": "10.0.14",
"private": true,
"repository": {
"type": "git",
......
[bumpversion]
current_version = 10.0.13
current_version = 10.0.14
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
......
......@@ -19,7 +19,7 @@
# along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>.
# ##############################################################################
__version__ = "10.0.13"
__version__ = "10.0.14"
__install_type__ = ""
import argparse
......
sickrage/version.txt = d576d8456c03446bcb99a32b8a6b4c25
sickrage/version.txt = 510a4a3278606bbfe460db05a2c8ca94
sickrage/checksums.md5 = d41d8cd98f00b204e9800998ecf8427e
sickrage/__init__.py = 1e6de3f658c4ed467fcae17f4f280fff
sickrage/__init__.py = 66751afdaa44d5a541113620ca72948a
sickrage/autoProcessTV/mediaToSiCKRAGE.py = f88a6679a211b1f97126c116e2c33b9c
sickrage/autoProcessTV/hellaToSiCKRAGE.py = 9bc477abfd456aaba8d6bf46f2c59b1f
sickrage/autoProcessTV/__init__.py = bfa892dee586740a3a618d3c1955156c
......@@ -256,7 +256,7 @@ sickrage/core/enums.py = 5a8fac089e8c4451a1d6b28c1762e684
sickrage/core/scene_numbering.py = e517e5232d3b9ca186fe8b33578abd4b
sickrage/core/announcements.py = 6c3ed44e7ae50c281383ab5f278102c6
sickrage/core/imdb_popular.py = 4739028ad8dac20901db175ef9df5875
sickrage/core/version_updater.py = 7fa57fa1eb0dde15dbdf322a524f91a5
sickrage/core/version_updater.py = d889241da6c2ab2ca217eaa319cc72f3
sickrage/core/traktapi.py = e30a23461b7e5d3af7619ad3e229bc40
sickrage/core/search.py = c8d189e6b61f29e6a364520c5142192e
sickrage/core/nzbSplitter.py = 8bb813262916d2208e905fb53e575284
......@@ -340,8 +340,8 @@ sickrage/core/webserver/static/fonts/fa-regular-400.ttf = 1a78af4105d4d56e6c34f7
sickrage/core/webserver/static/fonts/fa-brands-400.eot = 0fabb6606be4c45acfeedd115d0caca4
sickrage/core/webserver/static/fonts/fa-solid-900.svg = 03ba7cb710104df27f1c9c46d64bee4e
sickrage/core/webserver/static/css/core.min.css = 05ca1e9c48f013d71d97ecec458b9f76
sickrage/core/webserver/static/js/core.js.map = 5c2d9b0bba21bb10785d87b56931190c
sickrage/core/webserver/static/js/core.min.js = ed45eee4d27165e92d17c5205c07b899
sickrage/core/webserver/static/js/core.js.map = 3b0812b5cc5ae3001e80f27cc53c1bff
sickrage/core/webserver/static/js/core.min.js = 563a7348055c1a04a65bb7a33c08e586
sickrage/core/webserver/views/schedule.mako = 1492940accef5afe80d9cbd14be1c078
sickrage/core/webserver/views/history.mako = a90a54341918b398eb652d186a636952
sickrage/core/webserver/views/generic_message.mako = 20ba53fc129c1b69d5b8ccc960233757
......
......@@ -247,7 +247,7 @@ class UpdateManager(object):
def need_update(self):
try:
latest_version = self.latest_version
if self.version != latest_version:
if LooseVersion(self.version) < LooseVersion(latest_version):
sickrage.app.log.debug(f"SiCKRAGE version upgrade: {self.version} -> {latest_version}")
return True
except Exception as e:
......@@ -260,14 +260,13 @@ class UpdateManager(object):
def set_latest_version(self):
latest_version = self.latest_version
if self.version != latest_version:
if not self.manual_update:
update_url = f"{sickrage.app.config.general.web_root}/home/update/?pid={sickrage.app.pid}"
message = _(f'New SiCKRAGE {self.current_branch} update available, version {latest_version} &mdash; <a href=\"{update_url}\">Update Now</a>')
else:
message = _(f"New SiCKRAGE {self.current_branch} update available, version {latest_version}, please manually update!")
if not self.manual_update:
update_url = f"{sickrage.app.config.general.web_root}/home/update/?pid={sickrage.app.pid}"
message = _(f'New SiCKRAGE {self.current_branch} update available, version {latest_version} &mdash; <a href=\"{update_url}\">Update Now</a>')
else:
message = _(f"New SiCKRAGE {self.current_branch} update available, version {latest_version}, please manually update!")
sickrage.app.latest_version_string = message
sickrage.app.latest_version_string = message
@staticmethod
def _pip_cmd(args, silent=False):
......@@ -637,59 +636,20 @@ class PipUpdateManager(UpdateManager):
self.type = "pip"
self.manual_update = True
@property
def latest_version(self):
releases = []
latest_version = None
try:
resp = WebSession().get("https://pypi.org/pypi/sickrage/json").json()
if self.current_branch == 'develop':
releases = [x for x in resp["releases"].keys() if 'dev' in x]
elif self.current_branch == 'master':
releases = [x for x in resp["releases"].keys() if 'dev' not in x]
if releases:
latest_version = sorted(releases, key=LooseVersion, reverse=True)[0]
finally:
return latest_version or self.version
class SourceUpdateManager(UpdateManager):
def __init__(self):
super(SourceUpdateManager, self).__init__()
self.type = "source"
def version_regex(self):
return re.compile('^(?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)(?:.dev(?P<pre_release>[0-9]+))?$', re.IGNORECASE)
def need_update(self):
current_version_match = self.version_regex().match(self.version)
new_version_match = self.version_regex().match(self.latest_version)
if current_version_match and new_version_match:
for version_label in ['major', 'minor', 'patch', 'pre_release']:
try:
if version_label not in current_version_match.groupdict().keys() or version_label not in new_version_match.groupdict().keys():
continue
current_version_part = current_version_match.group(version_label)
new_version_part = new_version_match.group(version_label)
if current_version_part is None or new_version_part is None:
continue
if int(new_version_part) > int(current_version_part):
return True
except (IndexError, TypeError):
continue
def update(self):
"""
Downloads the latest source tarball from server and installs it over the existing version.
"""
tar_download_url = f'https://git.sickrage.ca/SiCKRAGE/sickrage/repository/archive.tar.gz?ref={self.current_branch}'
latest_version = self.latest_version
tar_download_url = f'https://git.sickrage.ca/SiCKRAGE/sickrage/-/archive/{latest_version}/sickrage-{latest_version}.tar.gz'
try:
if not self.upgrade_pip():
......@@ -730,6 +690,6 @@ class SourceUpdateManager(UpdateManager):
return False
# Notify update successful
NotificationProvider.mass_notify_version_update(self.latest_version)
NotificationProvider.mass_notify_version_update(latest_version)
return True
10.0.13
\ No newline at end of file
10.0.14
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment