Closed Bug 1246881 Opened 5 years ago Closed 5 years ago
Generate a header defining MOZ
No description provided.
Can't unfortunately use it in AppConstants.java.in, though because the marker is different.
This could be useful in bug 1153978.
Not sure how this happened, but I was missing the platform.ini part.
Comment on attachment 8717744 [details] [diff] [review] Only pass MOZ_BUILDID to the one source that requires it in toolkit/xre Moving this patch to bug 1241613.
Comment on attachment 8717370 [details] [diff] [review] Stop using config/buildid in few remaining places >+$buildid =~ s/^#define MOZ_BUILDID\s+(.*\S)\s*$/$1/; Why not just (\S+) instead of (.*\S) ? I don't think the header will work if there are whitespace characters in the buildid string anyway.
Attachment #8717370 - Flags: review?(mshal) → review+
Comment on attachment 8717743 [details] [diff] [review] Generate a header defining MOZ_BUILDID Overall this looks good, and it addresses my concern about platform.ini not having a buildid dependency now :) >diff --git a/build/variables.py b/build/variables.py >+def buildid_header(output): >+ buildid = os.environ.get('MOZ_BUILD_DATE') >+ if buildid and len(buildid) != 14: >+ print('Ignoring invalid MOZ_BUILD_DATE: %s' % buildid, file=sys.stderr) >+ buildid = None >+ if not buildid: >+ buildid = datetime.now().strftime('%Y%m%d%H%M%S') >+ output.write("#define MOZ_BUILDID %s\n" % buildid) client.mk: ifdef MOZ_UNIFY_BDATE ifndef MOZ_BUILD_DATE ifdef MOZ_BUILD_PROJECTS MOZ_BUILD_DATE = $(shell $(PYTHON) $(TOPSRCDIR)/toolkit/xre/make-platformini.py --print-buildid) export MOZ_BUILD_DATE endif endif Can we use the new build/variables.py when generating the buildid for universal builds as well? I don't like that we now have two scripts to generate the same thing (a date string) depending on what's being built. If we use build/variables.py here, then I think we can kill make-platformini.py as well. (Or, have make-platformini.py generate buildid.h instead of adding variables.py)
Attachment #8717743 - Flags: review?(mshal) → feedback+
Comment on attachment 8718103 [details] [diff] [review] Generate a header defining MOZ_BUILDID Looks good to me! Though I suppose this comment is out of date now: https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/android_version_code.py#79
Attachment #8718103 - Flags: review?(mshal) → review+
https://hg.mozilla.org/comm-central/rev/c3cbaf48ff68694c15fbc863c65cb57e6d19da01 Port Bug 1246881 - Generate a header defining MOZ_BUILDID for c-c. rs=bustage=fix
https://hg.mozilla.org/comm-central/rev/475bcb77d9b9fc9ccdcd00a93845d3c2dccecf53 Fix incorrect path in c-c's port of Bug 1246881. rs=bustage-fix
You need to log in before you can comment on or make changes to this bug.