[B.A.T.M.A.N.] [PATCH] Detect unstable version in SOURCE_VERSION

Sven Eckelmann sven.eckelmann at gmx.de
Sun Dec 28 16:33:02 UTC 2008


The SOURCE_VERSION consists of a version part and the actual status of
this version (called postfix). Both parts are seperated by a dash.
This seperator dash can be detected during runtime and can enable the
unstable warning instead of removing this warning in every release.
Before releasing the a new stable version the release manager must
remove the postfix of SOURCE_VERSION in batman.h, check INSTALL,
THANKS and README and then create the tag in the repository as usual.
Afterwards the development branch should change the SOURCE_VERSION to
the upcoming version number including a postfix starting with a dash
that informs the user that it is "unstable" and in development. This
could be for example "-dev", "-pre-alpha", "-beta" or "-rc1".

Signed-off-by: Sven Eckelmann <sven.eckelmann at gmx.de>
---
 batman/posix/init.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/batman/posix/init.c b/batman/posix/init.c
index c79c010..1447178 100644
--- a/batman/posix/init.c
+++ b/batman/posix/init.c
@@ -249,7 +249,8 @@ void apply_init_args( int argc, char *argv[] ) {
 	stop = 0;
 	prog_name = argv[0];
 
-/*	printf( "WARNING: You are using the unstable batman branch. If you are interested in *using* batman get the latest stable release !\n" );*/
+	if ( strstr( SOURCE_VERSION, "-" ) != NULL )
+		printf( "WARNING: You are using the unstable batman branch. If you are interested in *using* batman get the latest stable release !\n" );
 
 	while ( ( optchar = getopt_long( argc, argv, "a:A:bcd:hHio:g:p:r:s:vV", long_options, &option_index ) ) != -1 ) {
 
-- 
1.6.0.6




More information about the B.A.T.M.A.N mailing list