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 946efe8bded4..1af53c766a63 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 8c360368e916..839aac1ffc3e 100644 --- a/browser/app/macversion.py +++ b/browser/app/macversion.py @@ -28,7 +28,7 @@ if not options.version: # 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 790077e67bda..5055cdf70683 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 d28c00ba3d69..47c7dfe30e4a 100755 --- a/config/version_win.pl +++ b/config/version_win.pl @@ -114,7 +114,7 @@ if (!defined($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: @@ -183,7 +183,7 @@ $displayname =~ s/^\s*(.*)\s*$/$1/; 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);