the Unix way to get the svn version number with php and css classes
It 'pretty simple even if it uses a little known feature of svn.
inserting the following line of code in your configuration file example.
config.php define ('APP_VERSION', substr (substr ('$ Rev: 146 $', 6), 0, -2));
Just bring in the file directory to issue the following command $ svn
svn propset svn: keywords Revision config.php
et voila, whenever it commits il file viene automaticamente aggiornato con il numero di versione corrente.
La cosa risulta particolarmente utile per sincronizzare l'applicazione su più server e con più sviluppatori contemporaneamente o per scrivere aggiornamenti automatici.
Potete sugerire qualche uso creativo di questa possibilità?
0 comments:
Post a Comment