Opened 3 years ago
Closed 3 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: |
Description
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:
- use trim() when reading content from version file;
- 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 3 years ago by dotsid@…
comment:2 Changed 3 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 3 years ago by mrook
comment:4 Changed 3 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!

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.