Skip to content

Commit

Permalink
Add next-version task.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 8, 2012
1 parent 864cb39 commit 41bbc02
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/View/Pages/home.ctp
Expand Up @@ -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();
Expand Down
17 changes: 16 additions & 1 deletion build.xml
Expand Up @@ -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. -->
Expand Down Expand Up @@ -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>

0 comments on commit 41bbc02

Please sign in to comment.