implement FPR versioning into build system and UA

This commit is contained in:
Cameron Kaiser 2017-05-27 20:46:26 -07:00
parent e7767cdaa5
commit 6251e903f7
9 changed files with 37 additions and 7 deletions

View File

@ -95,7 +95,7 @@ tools repackage:: $(PROGRAM)
$(MKDIR) -p $(dist_dest)/$(LPROJ)
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents $(dist_dest) --exclude English.lproj
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(dist_dest)/$(LPROJ)
sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist
sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' -e 's/%APP_VERSION_DISPLAY%/$(MOZ_APP_VERSION_DISPLAY)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist
sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(dist_dest)/$(LPROJ)/InfoPlist.strings
rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(dist_dest)/Contents/Resources
rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(dist_dest)/Contents/MacOS

View File

@ -145,7 +145,7 @@
<key>CFBundleExecutable</key>
<string>firefox</string>
<key>CFBundleGetInfoString</key>
<string>%MAC_APP_NAME% %APP_VERSION%</string>
<string>%MAC_APP_NAME% %APP_VERSION_DISPLAY%</string>
<key>CFBundleIconFile</key>
<string>firefox.icns</string>
<key>CFBundleIdentifier</key>

View File

@ -1 +1 @@
45.9.0
45.10.0

View File

@ -1 +1 @@
45.9.0
Feature Parity Release 1

View File

@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
45.9.0
45.10.0

View File

@ -1890,6 +1890,7 @@ dnl Get mozilla version from central milestone file
dnl ==============================================================
MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir`
MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion`
TENFOURFOX_FPRVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --fprversion`
MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion`
if test -z "$MOZILLA_VERSION"; then
AC_MSG_ERROR([failed to read version info from milestone file])
@ -1910,6 +1911,7 @@ fi
AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION")
AC_DEFINE_UNQUOTED(MOZILLA_VERSION_U,$MOZILLA_VERSION)
AC_DEFINE_UNQUOTED(MOZILLA_UAVERSION,"$MOZILLA_UAVERSION")
AC_DEFINE_UNQUOTED(TENFOURFOX_FPRVERSION,"$TENFOURFOX_FPRVERSION")
AC_SUBST(MOZILLA_SYMBOLVERSION)
MOZ_DOING_LTO(lto_is_enabled)

View File

@ -294,7 +294,7 @@ nsHttpHandler::Init()
nsHttpChannelAuthProvider::InitializePrefs();
mMisc.AssignLiteral("rv:" MOZILLA_UAVERSION);
mMisc.AssignLiteral(TENFOURFOX_FPRVERSION "; rv:" MOZILLA_UAVERSION);
mCompatFirefox.AssignLiteral("Firefox/" MOZILLA_UAVERSION);

View File

@ -44,9 +44,18 @@ def get_milestone_major(milestone):
return milestone.split('.')[0]
def get_milestone_minor(milestone):
"""
Returns the minor (second) part of the milestone.
"""
return milestone.split('.')[1]
def main(args):
parser = argparse.ArgumentParser()
parser.add_argument('--uaversion', default=False, action='store_true')
parser.add_argument('--fprversion', default=False, action='store_true')
parser.add_argument('--symbolversion', default=False, action='store_true')
parser.add_argument('--topsrcdir', metavar='TOPSRCDIR', required=True)
options = parser.parse_args(args)
@ -61,6 +70,11 @@ def main(args):
uaversion = "%s.0" % (get_milestone_major(milestone),)
print(uaversion)
elif options.fprversion:
# Compute the FPR from the milestone (basically - 9).
fprversion = "FPR%s" % (int(get_milestone_minor(milestone))-9,)
print(fprversion)
elif options.symbolversion:
# Only expose major milestone and alpha version. Used for symbol
# versioning on Linux.

View File

@ -23,7 +23,21 @@ var versionNum = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULAppInfo)
.version;
var version = document.getElementById("version");
version.textContent += " " + versionNum;
// paranoia
if (versionNum.substr(0,3) == "45.") {
// FPR series
var vf = 0 + versionNum.substr(3);
var pl = ""+ (vf - (vf|0));
pl = 0 + pl.substr(1);
vf = vf|0; vf -= 9;
// XXX localize me
version.textContent = "Feature Parity Release "+vf+
((pl > 0) ? " (Security Parity Release "+pl+")" : "")+
" ("+versionNum+")";
} else {
version.textContent += " " + versionNum;
}
// append user agent
var ua = navigator.userAgent;