From ff5e56e36cc0beedc5d6b38bcf7c09945cb587af Mon Sep 17 00:00:00 2001 From: Swann Martinez Date: Thu, 12 Mar 2020 11:57:54 +0100 Subject: [PATCH] fix: use release --- multi_user/addon_updater.py | 6 +++++- multi_user/addon_updater_ops.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/multi_user/addon_updater.py b/multi_user/addon_updater.py index d4aa6b8..6750358 100644 --- a/multi_user/addon_updater.py +++ b/multi_user/addon_updater.py @@ -1656,7 +1656,11 @@ class GitlabEngine(object): if response == None: return [] # Return asset links from release - return [{"name": tag["name"], "zipball_url": tag["assets"]["links"][0]["url"]} for tag in response] + if updater.use_releases: + return [{"name": release["name"], "zipball_url": release["assets"]["links"][0]["url"]} for release in response] + else: + return [{"name": tag["name"], "zipball_url": self.get_zip_url(tag["commit"]["id"], updater)} for tag in response] + # ----------------------------------------------------------------------------- diff --git a/multi_user/addon_updater_ops.py b/multi_user/addon_updater_ops.py index cf79b3b..30c0e47 100644 --- a/multi_user/addon_updater_ops.py +++ b/multi_user/addon_updater_ops.py @@ -1368,11 +1368,11 @@ def register(bl_info): # the "install {branch}/older version" operator. updater.include_branches = True - # (GitHub only) This options allows the user to use releases over tags for data, + # (GitHub/Gitlab only) This options allows the user to use releases over tags for data, # which enables pulling down release logs/notes, as well as specify installs from # release-attached zips (instead of just the auto-packaged code generated with # a release/tag). Setting has no impact on BitBucket or GitLab repos - updater.use_releases = False + updater.use_releases = True # note: Releases always have a tag, but a tag may not always be a release # Therefore, setting True above will filter out any non-annoted tags # note 2: Using this option will also display the release name instead of