From patchwork Sun Dec 28 13:05:32 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 5352 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by open-mesh.net (8.13.4/8.13.4/Debian-3sarge3) with SMTP id mBSDBoXa028568 for ; Sun, 28 Dec 2008 14:11:51 +0100 Received: (qmail invoked by alias); 28 Dec 2008 13:05:37 -0000 Received: from unknown (EHLO localhost) [89.246.200.153] by mail.gmx.net (mp047) with SMTP; 28 Dec 2008 14:05:37 +0100 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1/MJkdNtGLMoi//M7KAs5TlzvzUyHuQEZHB9LMIvi cykWjChC56oPtN From: Sven Eckelmann To: b.a.t.m.a.n@open-mesh.net Date: Sun, 28 Dec 2008 14:05:32 +0100 Message-Id: <1230469532-24319-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.6.0.6 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.48 Subject: [B.A.T.M.A.N.] [PATCH] Split SOURCE_VERSION in RELEASE- AND EXTRA_VERSION X-BeenThere: b.a.t.m.a.n@open-mesh.net X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 13:11:51 -0000 RELEASE_VERSION and EXTRA_VERSION can be concatenate to a single SOURCE_VERSION string. This makes it possible to detect unstable versions during compile time instead of removing the unstable warning in a seperate commit (or forget this change). Before releasing the a new stable version the release manager must set EXTRA_VERSION to "", check INSTALL, THANKS and README and then create the tag in the repository. Afterwards the development branch should change the RELEASE_VERSION to the upcoming version number and the EXTRA_VERSION to a string which 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 --- batman/batman.h | 5 ++++- batman/posix/init.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/batman/batman.h b/batman/batman.h index 6af9136..6d1c16a 100644 --- a/batman/batman.h +++ b/batman/batman.h @@ -39,7 +39,8 @@ -#define SOURCE_VERSION "0.3.1" /* put exactly one distinct word inside the string like "0.3-pre-alpha" or "0.3-rc1" or "0.3" */ +#define RELEASE_VERSION "0.3.1" /* put exactly one distinct word inside the string like "0.3" or "0.3.1" */ +#define EXTRA_VERSION "" /* put one or less distinct words inside the string like "-pre-alpha" or "-rc1" or "" */ #define COMPAT_VERSION 5 #define PORT 4305 #define GW_PORT 4306 @@ -66,6 +67,8 @@ #define REVISION_VERSION "0" #endif +#define SOURCE_VERSION RELEASE_VERSION""EXTRA_VERSION + /* diff --git a/batman/posix/init.c b/batman/posix/init.c index c79c010..b850b61 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 (strlen(EXTRA_VERSION) > 0) + 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 ) {