Bug 838459 - Add printing of current timestamp to make-platformini.py. r=gps

This commit is contained in:
Richard Newman 2013-02-05 20:15:35 -08:00
parent ae5deaeab7
commit 84b347ac99

View File

@ -6,17 +6,23 @@
from optparse import OptionParser
from datetime import datetime
import time
import sys
import os
o = OptionParser()
o.add_option("--buildid", dest="buildid")
o.add_option("--print-buildid", action="store_true", dest="print_buildid")
o.add_option("--print-timestamp", action="store_true", dest="print_timestamp")
o.add_option("--sourcestamp", dest="sourcestamp")
o.add_option("--sourcerepo", dest="sourcerepo")
(options, args) = o.parse_args()
if options.print_timestamp:
print int(time.time())
sys.exit(0)
if options.print_buildid:
print datetime.now().strftime('%Y%m%d%H%M%S')
sys.exit(0)