summaryrefslogtreecommitdiff
path: root/Config
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-18 19:53:32 -0500
committerAdam <Adam@anope.org>2010-12-18 19:53:32 -0500
commit21125cf2cb0dc5f80f9f796fe4c222c36ba2fcc4 (patch)
tree4e5f1f8849510e0290974ba554274947b7fa679e /Config
parent0d20c4770350f30cfa5563c913464a37fdf9a067 (diff)
Made the version generator code work right when we are on a tag because git describe just gives the tag name and nothing else.
Diffstat (limited to 'Config')
-rwxr-xr-xConfig8
1 files changed, 4 insertions, 4 deletions
diff --git a/Config b/Config
index fa35b2d43..4ccc82c62 100755
--- a/Config
+++ b/Config
@@ -168,11 +168,11 @@ if [ ! "$NO_INTRO" ] ; then
VERSION=`git describe --tags`
VERSION_BUILD=`echo "$VERSION" | cut -d'-' -f2`
VERSION_EXTRA=`echo "$VERSION" | cut -d'-' -f3`
- if [ "$VERSION_BUILD" == "$VERSION_EXTRA" ] ; then
- VERSION_EXTRA=""
+ # Only do this if we are not on a tag, src/version.sh will be all we need then.
+ if [ "$VERSION_BUILD" != "$VERSION_EXTRA" ] ; then
+ echo "#define VERSION_BUILD $VERSION_BUILD" > include/version.h
+ echo "#define VERSION_EXTRA \"$VERSION_EXTRA\"" >> include/version.h
fi
- echo "#define VERSION_BUILD $VERSION_BUILD" > include/version.h
- echo "#define VERSION_EXTRA \"$VERSION_EXTRA\"" >> include/version.h
fi
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
echo ""