Closed Bug 481703 Opened 15 years ago Closed 15 years ago

Use python to create pre release suffix

Categories

(Firefox Build System :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla3.5b4

People

(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)

References

Details

Attachments

(1 file, 4 obsolete files)

Spinoff of bug 481680.

As bsmedberg stated, python or perl is more reliable / consistent when doing this on all platforms.
Attached patch patch in progress (bitrotted) (obsolete) — Splinter Review
The tests are there but they need some additional work / cleanup
Attachment #365706 - Attachment description: patch in progress → patch in progress (bitrotted)
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
OS: Windows Vista → All
Hardware: x86 → All
Marking blocking as we'll need this for the next beta; alternative is to unblock on this and remember to file a blocking bug on manually overriding the OSX title change every time.
Flags: blocking-firefox3.1+
Priority: -- → P2
--> P1, as this bug will require the wider feedback of a beta release or is of sufficient complexity that we should be looking at it sooner, not later.
Priority: P2 → P1
Attached patch patch rev1 w/ tests (obsolete) — Splinter Review
Benjamin, I went with something a little more complex in order to restrict creating the pre-release suffix to version strings that only contain 0-9, periods, and a single 'a' or a single 'b' since version strings can be of the format 1.1aa per
https://developer.mozilla.org/En/Toolkit_version_format
Attachment #365706 - Attachment is obsolete: true
Attachment #367279 - Flags: review?(benjamin)
Target Milestone: --- → Firefox 3.1b3
Attachment #367279 - Attachment is obsolete: true
Attachment #367545 - Flags: review?(benjamin)
Attachment #367279 - Flags: review?(benjamin)
Whiteboard: [needs review bsmedberg]
Comment on attachment 367545 [details] [diff] [review]
patch rev2 - removed redundant check and added a couple of tests

>+++ b/config/printprereleasesuffix.py

>+def get_prerelease_suffix(version):        

I think this can be simpler and easier to read:

  def mfunc(m):
    return "%s %s %s" % (m.group('prefix'),
                         {'a': 'Alpha', 'b': 'Beta'}[m.group('c')],
                         m.group('suffix'))
  result, c = re.subn(r'^(?P<prefix>(\d+\.)*\d+)(?P<c>[ab])(?P<suffix>\d+)$',
                      mfunc, version)
  if c != 1:
    return ''
  return result
Attachment #367545 - Flags: review?(benjamin) → review-
Attachment #367545 - Attachment is obsolete: true
Attachment #368014 - Flags: review?(benjamin)
Attachment #368014 - Flags: review?(benjamin) → review+
Oh, it would be better to do := instead of = in the makefile, so that we only run the python script once.
Attachment #368014 - Attachment is obsolete: true
Attachment #368310 - Flags: review+
pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/ae69c2f236cd
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [needs review bsmedberg]
Target Milestone: Firefox 3.1b3 → Firefox 3.5b4
Flags: in-testsuite+
Component: Build Config → General
Product: Firefox → Firefox Build System
Keywords: fixed1.9.1
Target Milestone: Firefox 3.5b4 → mozilla3.5b4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: