Add next-version task.

This commit is contained in:
mark_story 2011-12-28 17:59:50 -05:00
parent 864cb3920c
commit 41bbc02603
2 changed files with 17 additions and 2 deletions

View file

@ -24,7 +24,7 @@ App::uses('Debugger', 'Utility');
<p>For updates and important announcements, visit http://cakefest.org</p>
</iframe>
<h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2>
<a href="http://cakephp.org/changelogs/2.0.5"><?php echo __d('cake_dev', 'Read the changelog'); ?> </a>
<a href="http://cakephp.org/changelogs/<?php echo Configure::version(); ?>"><?php echo __d('cake_dev', 'Read the changelog'); ?> </a>
<?php
if (Configure::read('debug') > 0):
Debugger::checkSecurityKeys();

View file

@ -40,7 +40,7 @@
<exec executable="php" outputProperty="version">
<arg value="-r" />
<arg value="$fh = file('./lib/Cake/VERSION.txt'); echo strtoupper(array_pop($fh));" />
<arg value="$fh = file('./lib/Cake/VERSION.txt'); echo array_pop($fh);" />
</exec>
<!-- set PEAR stability based on version number. -->
@ -121,5 +121,20 @@
<target name="build" depends="generate-package" />
<!--
Bump the version number and commit that.
-->
<target name="next-version" depends="prepare">
<echo msg="Incrementing version." />
<propertyprompt propertyName="release_version" defaultValue="${version}" promptText="Enter version to be released (without -DEV)"/>
<echo msg="New version will be ${release_version}" />
<echo msg="$file = file_get_contents('./lib/Cake/VERSION.txt'); $file = str_replace('${version}', '${release_version}', $file); file_put_contents('./lib/Cake/VERSION.txt', $file);" />
<exec executable="php">
<arg value="-r" />
<arg value="$file = file_get_contents('./lib/Cake/VERSION.txt'); $file = str_replace('${version}', '${release_version}', $file); file_put_contents('./lib/Cake/VERSION.txt', $file);" />
</exec>
</target>
</project>