Fix mac builddate-unifying logic from bug 383167

This commit is contained in:
benjamin%smedbergs.us 2007-06-25 17:58:21 +00:00
Родитель da35219480
Коммит e3e0edb287
2 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -457,6 +457,7 @@ ifndef MAKE
MAKE := gmake
endif
PERL ?= perl
PYTHON ?= python
CONFIG_GUESS_SCRIPT := $(wildcard $(TOPSRCDIR)/build/autoconf/config.guess)
ifdef CONFIG_GUESS_SCRIPT
@ -940,7 +941,7 @@ else
ifdef MOZ_UNIFY_BDATE
ifndef MOZ_BUILD_DATE
ifdef MOZ_BUILD_PROJECTS
MOZ_BUILD_DATE = $(shell $(PERL) -I$(TOPSRCDIR)/config $(TOPSRCDIR)/config/bdate.pl)
MOZ_BUILD_DATE = $(shell $(PYTHON) $(TOPSRCDIR)/toolkit/xre/make-platformini.py --print-buildid)
export MOZ_BUILD_DATE
endif
endif

Просмотреть файл

@ -3,9 +3,19 @@
from optparse import OptionParser
from datetime import datetime
import sys
import os
(milestoneFile,) = sys.argv[1:]
o = OptionParser()
o.add_option("--print-buildid", action="store_true", dest="print_buildid")
(options, args) = o.parse_args()
buildid = os.environ.get('MOZ_BUILD_DATE', datetime.now().strftime('%Y%m%d%H'))
if options.print_buildid:
print buildid
sys.exit(0)
(milestoneFile,) = args
for line in open(milestoneFile, 'r'):
if line[0] == '#':
continue
@ -18,4 +28,4 @@ for line in open(milestoneFile, 'r'):
print """[Build]
BuildID=%s
Milestone=%s""" % (datetime.now().strftime('%Y%m%d%H'), milestone)
Milestone=%s""" % (buildid, milestone)