summaryrefslogtreecommitdiff
path: root/Config
diff options
context:
space:
mode:
authorAdam <Adam@Anope.org>2010-06-25 20:00:21 -0400
committerAdam <Adam@Anope.org>2010-06-25 20:00:21 -0400
commit03fbc7d281f5039a97c851970dea3cd8cfaefd64 (patch)
treec527046a41b97751b1a52ba7046e36337f0d0373 /Config
parentcbcead4e89b3dc0dfb236fff9cb3e62b1b0707c0 (diff)
Changed the versioning system to use git
Diffstat (limited to 'Config')
-rwxr-xr-xConfig9
1 files changed, 7 insertions, 2 deletions
diff --git a/Config b/Config
index 26ed1a4f2..145f1f3e6 100755
--- a/Config
+++ b/Config
@@ -205,8 +205,13 @@ if [ ! "$NO_INTRO" ] ; then
clear
;;
esac
- . $SOURCE_DIR/version.log
- cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
+ . src/version.sh
+ if [ -d .git ] ; then
+ VERSION=`git describe --tags`
+ echo "#define VERSION_BUILD `echo "$VERSION" | cut -d'-' -f2`" > include/version.h
+ echo "#define VERSION_EXTRA \"-`echo "$VERSION" | cut -d'-' -f3`$VERSION_EXTRA\"" >> include/version.h
+ fi
+ cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
echo ""
else
echo ""