Opened 7 years ago

Closed 7 years ago

#513 closed defect (fixed)

Version tag doesn't increment bugfix portion of the version

Reported by: dotsid@… Owned by: mrook
Priority: major Milestone: 2.4.3
Component: phing-tasks-ext Version: 2.4.1
Keywords: version Cc:


Almost all unix editors adds a newline to the end of text files. This is unix convention on text files. This newlines cause problems with <version /> tag.

When tag handler reads data it explode it by dot as a delimiter, and bugfix portion of the version contains \n symbol.

There are several ways to do about the problem:

  1. use trim() when reading content from version file;
  2. use $bugfix + 1 (not $bugfix++) expression for incrementing version. It seems that $v + 1 expression cast $v to integer and newline disappear before incrementing variable.

I think it also would be nice if version file will have \n at the end.

Attachments (0)

Change History (4)

comment:1 Changed 7 years ago by dotsid@…

I also have a patch for problem solution which is trivial. But for some reason I can't upload it. Trac says: "attachment is not indexable" or something like that.

comment:2 Changed 7 years ago by mrook

If you still can't upload the patch, please send it off-list to mrook AT php DOT net

comment:3 Changed 7 years ago by mrook

(In [819]) Refs #513 - strip and add newlines (patch by Denis Bazhenov)

comment:4 Changed 7 years ago by mrook

  • Resolution set to fixed
  • Status changed from new to closed

We believe this issue has been fixed in the SVN trunk.

Thank you for the report, and for helping us make Phing better!

Add Comment

Modify Ticket

as closed The owner will remain mrook.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.