Permalink
Browse files

Fix bug in make-release-commit and version increment

  • Loading branch information...
1 parent 812c44d commit 7551ad618d3449a2a44710aadaea132b84fd49e7 @beberlei beberlei committed Dec 19, 2011
Showing with 6 additions and 2 deletions.
  1. +2 −1 VersionIncrementTask.php
  2. +4 −1 packaging.xml
View
@@ -33,7 +33,8 @@ public function init()
public function main()
{
- $parts = explode(".", str_ireplace(array('-DEV', '-ALPHA', '-BETA'), '', $this->version));
+ $version = preg_replace('((-RC[0-9]+|-DEV|-ALPHA|-BETA))/i', '', $this->version);
+ $parts = explode(".", $version);
if (count($parts) != 3) {
throw new \InvalidArgumentException("Version is assumed in format x.y.z, $this->version given");
}
View
@@ -48,6 +48,9 @@
<condition property="pear.stability" value="dev">
<contains string="${version}" substring="devel" casesensitive="false"/>
</condition>
+ <condition property="pear.stability" value="beta">
+ <contains string="${version}" substring="rc" casesensitive="false" />
+ </condition>
<condition property="pear.stability" value="stable">
<not><isset property="pear.stability"/></not>
</condition>
@@ -110,7 +113,7 @@
<!-- calculate next version, assume that this is a mini version. -->
<versionincrement property="next_version" version="${version}" />
- <replace file="${project.basedir}/${project.version_file}" token="${release_version}" value="${next_version}"/>
+ <replace file="${project.basedir}/${project.version_file}" token="${release_version}" value="${next_version}-DEV"/>
<replace file="${project.basedir}/composer.json" value="&quot;library&quot;," token="&quot;library&quot;,&quot;version&quot;:&quot;${release_version}&quot;,"/>
<exec command="git add ${project.basedir}/${project.version_file} ${project.basedir}/composer.json" />
<exec command="git commit -m 'Bump dev version to ${next_version}'" />

0 comments on commit 7551ad6

Please sign in to comment.