Skip to content

Commit

Permalink
Add new per-plugin release channel tracking.
Browse files Browse the repository at this point in the history
  • Loading branch information
FormerLurker committed Nov 30, 2020
1 parent 6b53072 commit 1535541
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions octoprint_octolapse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3669,31 +3669,30 @@ def get_assets(self):
)

def get_release_info(self):
# get the checkout type from the software updater
prerelease_channel = None
is_prerelease = False
# get this for reference. Eventually I'll have to use it!
# is the software update set to prerelease?

if self._settings.global_get(["plugins", "softwareupdate", "checks", "octoprint", "prerelease"]):
# If it's a prerelease, look at the channel and configure the proper branch for Arc Welder
prerelease_channel = self._settings.global_get(
["plugins", "softwareupdate", "checks", "octoprint", "prerelease_channel"]
)
if prerelease_channel == "rc/maintenance":
is_prerelease = True
prerelease_channel = "rc/maintenance"
elif prerelease_channel == "rc/devel":
is_prerelease = True
prerelease_channel = "rc/devel"
# Starting with V1.5.0 prerelease branches are supported!
if LooseVersion(octoprint.server.VERSION) < LooseVersion("1.5.0"):
# get the checkout type from the software updater
prerelease_channel = None
is_prerelease = False
# get this for reference. Eventually I'll have to use it!
# is the software update set to prerelease?
if self._settings.global_get(["plugins", "softwareupdate", "checks", "octoprint", "prerelease"]):
# If it's a prerelease, look at the channel and configure the proper branch for Arc Welder
prerelease_channel = self._settings.global_get(
["plugins", "softwareupdate", "checks", "octoprint", "prerelease_channel"]
)
if prerelease_channel == "rc/maintenance":
is_prerelease = True
prerelease_channel = "rc/maintenance"
elif prerelease_channel == "rc/devel":
is_prerelease = True
prerelease_channel = "rc/devel"
OctolapsePlugin.octolapse_update_info["prerelease"] = is_prerelease
if prerelease_channel is not None:
OctolapsePlugin.octolapse_update_info["prerelease_channel"] = prerelease_channel

OctolapsePlugin.octolapse_update_info["displayVersion"] = self._plugin_version
OctolapsePlugin.octolapse_update_info["current"] = self._plugin_version

OctolapsePlugin.octolapse_update_info["prerelease"] = is_prerelease
#OctolapsePlugin.octolapse_update_info["python_checker"] = self
if prerelease_channel is not None:
OctolapsePlugin.octolapse_update_info["prerelease_channel"] = prerelease_channel

return dict(
octolapse=OctolapsePlugin.octolapse_update_info
)
Expand Down

0 comments on commit 1535541

Please sign in to comment.