Bug 1246881 - Stop using config/buildid in few remaining places. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 09 Feb 2016 17:53:12 +0900
changeset 320380 9f791573855763afbb8455d9ddf150e4503166f3
parent 320379 02840dfc6310ad181aa7c3b49ef51c3dd1d71e95
child 320381 33fd2913ce4a20f615f1d6d0b85232bb60051413
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1246881
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1246881 - Stop using config/buildid in few remaining places. r=mshal
browser/app/Makefile.in
browser/app/macversion.py
config/Makefile.in
config/version_win.pl
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -74,17 +74,17 @@ LPROJ_ROOT := $(subst -,_,$(AB_CD))
 else
 LPROJ_ROOT := $(firstword $(subst -, ,$(AB_CD)))
 endif
 LPROJ := Contents/Resources/$(LPROJ_ROOT).lproj
 
 clean clobber repackage::
 	$(RM) -r $(dist_dest)
 
-MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/config/buildid)
+MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/buildid.h)
 
 .PHONY: repackage
 tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME)
 	$(MKDIR) -p $(dist_dest)/Contents/MacOS
 	$(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
--- a/browser/app/macversion.py
+++ b/browser/app/macversion.py
@@ -23,17 +23,17 @@ if not options.version:
     sys.exit(1)
 
 # We want to build a version number that matches the format allowed for
 # CFBundleVersion (nnnnn[.nn[.nn]]). We'll incorporate both the version
 # number as well as the date, so that it changes at least daily (for nightly
 # builds), but also so that newly-built older versions (e.g. beta build) aren't
 # considered "newer" than previously-built newer versions (e.g. a trunk nightly)
 
-buildid = open(options.buildid, 'r').read()
+define, MOZ_BUILDID, buildid = open(options.buildid, 'r').read().split()
 
 # extract only the major version (i.e. "14" from "14.0b1")
 majorVersion = re.match(r'^(\d+)[^\d].*', options.version).group(1)
 # last two digits of the year
 twodigityear = buildid[2:4]
 month = buildid[4:6]
 if month[0] == '0':
   month = month[1]
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -27,31 +27,16 @@ NSINSTALL_EXECUTABLES := nsinstall$(HOST
 NSINSTALL_DEST := $(DIST)/bin
 NSINSTALL_TARGET := host
 INSTALL_TARGETS += NSINSTALL
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
 
-ifndef JS_STANDALONE
-ifndef MOZ_PROFILE_USE
-# Generate a new buildid every time we "export" in config... that's only
-# supposed to be once per-build!
-export:: buildid
-
-buildid: FORCE
-ifdef MOZ_BUILD_DATE
-	printf '%s' $(MOZ_BUILD_DATE) > buildid
-else
-	$(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid > buildid
-endif
-endif
-endif
-
 ifdef WRAP_SYSTEM_INCLUDES
 export-preqs = \
   $(call mkdir_deps,system_wrappers) \
   $(NULL)
 
 export:: $(export-preqs)
 	$(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
 		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
--- a/config/version_win.pl
+++ b/config/version_win.pl
@@ -109,17 +109,17 @@ if (!defined($module))
 {
 	$module = $binary;
 	($module) = split(/\./,$module);
 }
 
 my $bufferstr="    ";
 
 my $MILESTONE_FILE = "$topsrcdir/config/milestone.txt";
-my $BUILDID_FILE = "$depth/config/buildid";
+my $BUILDID_FILE = "$depth/buildid.h";
 
 #Read module.ver file
 #Version file overrides for WIN32:
 #WIN32_MODULE_COMMENT
 #WIN32_MODULE_DESCRIPTION
 #WIN32_MODULE_FILEVERSION
 #WIN32_MODULE_COMPANYNAME
 #WIN32_MODULE_FILEVERSION_STRING
@@ -178,17 +178,17 @@ else
 $description =~ s/^\s*(.*)\s*$/$1/;
 $module =~ s/^\s*(.*)\s*$/$1/;
 $depth =~ s/^\s*(.*)\s*$/$1/;
 $binary =~ s/^\s*(.*)\s*$/$1/;
 $displayname =~ s/^\s*(.*)\s*$/$1/;
 
 open(BUILDID, "<", $BUILDID_FILE) || die("Couldn't open buildid file: $BUILDID_FILE");
 $buildid = <BUILDID>;
-$buildid =~ s/\s*$//;
+$buildid =~ s/^#define MOZ_BUILDID\s+(\S+)\s*$/$1/;
 close BUILDID;
 
 my $daycount = daysFromBuildID($buildid);
 
 if ($milestone eq "") {
     $milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
 }