Skip to content

Commit

Permalink
Bug 1719852 - Derive addon sideload default from milestone rather tha…
Browse files Browse the repository at this point in the history
…n update channel. r=firefox-build-system-reviewers,mhentges

Differential Revision: https://phabricator.services.mozilla.com/D119683
  • Loading branch information
glandium committed Jul 13, 2021
1 parent a6909dc commit 6a07c77
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions toolkit/moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -1436,31 +1436,17 @@ def unsigned_addon_scopes(scopes):
set_config("MOZ_UNSIGNED_APP_SCOPE", unsigned_addon_scopes.app)
set_config("MOZ_UNSIGNED_SYSTEM_SCOPE", unsigned_addon_scopes.system)


# Addon sideloading
# ==============================================================


@depends(update_channel)
def addon_sideload_allowed_default(update_channel):
if update_channel == "esr":
return True


option(
"--allow-addon-sideload",
default=addon_sideload_allowed_default,
default=milestone.is_esr,
help="Addon sideloading is allowed",
)


@depends("--allow-addon-sideload")
def addon_sideload_allowed(value):
allowed = bool(value)
if allowed:
return True


set_config("MOZ_ALLOW_ADDON_SIDELOAD", addon_sideload_allowed)
set_config("MOZ_ALLOW_ADDON_SIDELOAD", True, when="--allow-addon-sideload")

# WebExtensions API WebIDL bindings
# ==============================================================
Expand Down

0 comments on commit 6a07c77

Please sign in to comment.