Skip to content

Commit

Permalink
Bug 1502457 - Derive the default update channel from the application …
Browse files Browse the repository at this point in the history
…display version. r=nalexander

Depends on D11986

Differential Revision: https://phabricator.services.mozilla.com/D11987
  • Loading branch information
glandium committed Nov 16, 2018
1 parent 62425b7 commit dc4474f
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions build/moz.configure/init.configure
Original file line number Diff line number Diff line change
Expand Up @@ -1154,13 +1154,29 @@ set_config('MOZ_APP_VERSION', milestone.app_version)
set_config('MOZ_APP_VERSION_DISPLAY', milestone.app_version_display)
add_old_configure_assignment('MOZ_APP_VERSION', milestone.app_version)

# The app update channel is 'default' when not supplied. The value is used in
# the application's confvars.sh (and is made available to a project specific
# moz.configure).

# The app update channel is 'default' when not supplied, and MOZILLA_OFFICIAL
# is not set. When MOZILLA_OFFICIAL is set, the default is derived from
# the application display version.
@depends(milestone, mozilla_official)
def default_update_channel(milestone, mozilla_official):
if not mozilla_official:
return 'default'
if milestone.is_release_or_beta:
if 'esr' in milestone.app_version_display:
return 'esr'
if 'b' in milestone.app_version_display:
return 'beta'
return 'release'
if milestone.is_nightly:
return 'nightly'
return 'default'


option('--enable-update-channel',
nargs=1,
help='Select application update channel',
default='default')
default=default_update_channel)


@depends('--enable-update-channel')
Expand Down

0 comments on commit dc4474f

Please sign in to comment.