From 9383395b07081e5be2d8c8d60b9244a78477210a Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 9 Feb 2016 17:53:12 +0900 Subject: [PATCH] Bug 1246881 - Stop using config/buildid in few remaining places. r=mshal --- browser/app/Makefile.in | 2 +- browser/app/macversion.py | 2 +- config/Makefile.in | 15 --------------- config/version_win.pl | 4 ++-- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 946efe8bded4c..1af53c766a633 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -79,7 +79,7 @@ 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) diff --git a/browser/app/macversion.py b/browser/app/macversion.py index 8c360368e916a..839aac1ffc3e4 100644 --- a/browser/app/macversion.py +++ b/browser/app/macversion.py @@ -28,7 +28,7 @@ # 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) diff --git a/config/Makefile.in b/config/Makefile.in index 790077e67bda4..5055cdf70683c 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -32,21 +32,6 @@ 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) \ diff --git a/config/version_win.pl b/config/version_win.pl index d28c00ba3d695..47c7dfe30e4a7 100755 --- a/config/version_win.pl +++ b/config/version_win.pl @@ -114,7 +114,7 @@ sub getNextEntry 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: @@ -183,7 +183,7 @@ sub getNextEntry open(BUILDID, "<", $BUILDID_FILE) || die("Couldn't open buildid file: $BUILDID_FILE"); $buildid = ; -$buildid =~ s/\s*$//; +$buildid =~ s/^#define MOZ_BUILDID\s+(\S+)\s*$/$1/; close BUILDID; my $daycount = daysFromBuildID($buildid);