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)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla21
People
(Reporter: rnewman, Assigned: rnewman)
References
Details
Attachments
(1 file, 1 obsolete file)
|
1.29 KB,
patch
|
gps
:
review+
|
Details | Diff | 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 1•13 years ago
|
||
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)
| Assignee | ||
Comment 2•13 years ago
|
||
(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 | ||
Comment 3•13 years ago
|
||
Assignee: nobody → rnewman
Attachment #710485 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #710489 -
Flags: review?(gps)
Comment 4•13 years ago
|
||
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+
| Assignee | ||
Comment 5•13 years ago
|
||
Target Milestone: --- → mozilla21
Comment 6•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•