Closed Bug 838459 Opened 13 years ago Closed 13 years ago

Add printing of current timestamp to make-platformini.py

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla21

People

(Reporter: rnewman, Assigned: rnewman)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Proposed patch. v1 (obsolete) — Splinter Review
mbrubeck pointed me to where the Android makefiles call out to make-platformini to get a build ID, which they then increment to get an increasing version number. Hacky, but hey. This code already uses Python to manipulate dates, so it seems like a reasonable place to hang something I need right now: a portable way to get the current Unix timestamp. Recommendations for a better way to do this most welcome.
Attachment #710485 - Flags: review?(gps)
Comment on attachment 710485 [details] [diff] [review] Proposed patch. v1 Review of attachment 710485 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/xre/make-platformini.py @@ +19,5 @@ > > (options, args) = o.parse_args() > > +if options.print_timestamp: > + print calendar.timegm(datetime.now().timetuple()) import time print(int(time.time())) Much simpler and much more common. I'm not even sure what all that calendar, datetime, and timetuple foo does.
Attachment #710485 - Flags: review?(gps)
(In reply to Gregory Szorc [:gps] from comment #1) > Much simpler and much more common. I'm not even sure what all that calendar, > datetime, and timetuple foo does. That was what the docs I found recommended :/ E_TOO_MANY_LIBRARIES
Assignee: nobody → rnewman
Attachment #710485 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #710489 - Flags: review?(gps)
Comment on attachment 710489 [details] [diff] [review] Proposed patch. v2 Review of attachment 710489 [details] [diff] [review]: ----------------------------------------------------------------- I can't speak for make-platformini.py being the best place for a one liner that could easily be accomplished with |python -c 'import time; print(int(time.time()))'| but meh.
Attachment #710489 - Flags: review?(gps) → review+
Blocks: 838464
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: