b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: b.a.t.m.a.n@open-mesh.net
Subject: [B.A.T.M.A.N.] [PATCH] Split SOURCE_VERSION in RELEASE- AND EXTRA_VERSION
Date: Sun, 28 Dec 2008 14:05:32 +0100	[thread overview]
Message-ID: <1230469532-24319-1-git-send-email-sven.eckelmann@gmx.de> (raw)

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 <sven.eckelmann@gmx.de>
---
 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 ) {
 
-- 
1.6.0.6


             reply	other threads:[~2008-12-28 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-28 13:05 Sven Eckelmann [this message]
2008-12-28 14:24 ` [B.A.T.M.A.N.] [PATCH] Split SOURCE_VERSION in RELEASE- AND EXTRA_VERSION Marek Lindner
2008-12-28 16:30   ` Sven Eckelmann
2008-12-28 16:33     ` [B.A.T.M.A.N.] [PATCH] Detect unstable version in SOURCE_VERSION Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1230469532-24319-1-git-send-email-sven.eckelmann@gmx.de \
    --to=sven.eckelmann@gmx.de \
    --cc=b.a.t.m.a.n@open-mesh.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).