mirror of
https://github.com/anope/anope.git
synced 2026-06-12 19:14:47 +02:00
Prevent version.cpp from prepending version.sh's VERSION_EXTRA on every build
This commit is contained in:
@@ -171,7 +171,7 @@ if [ ! "$NO_INTRO" ] ; then
|
||||
# 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
|
||||
echo "#define VERSION_EXTRA \"-$VERSION_EXTRA\"" >> include/version.h
|
||||
fi
|
||||
fi
|
||||
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
|
||||
for (std::list<std::pair<std::string, std::string> >::iterator it = versions.begin(), it_end = versions.end(); it != it_end; ++it)
|
||||
{
|
||||
if (it->first == "EXTRA")
|
||||
fd << "#define VERSION_EXTRA \"" << (!version_extra.empty() ? version_extra : "") << it->second << "\"" << std::endl;
|
||||
fd << "#define VERSION_EXTRA \"" << (!version_extra.empty() ? version_extra : "") << (version_extra.find(it->second) == std::string::npos ? it->second : "") << "\"" << std::endl;
|
||||
else
|
||||
fd << "#define VERSION_" << it->first << " " << it->second << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user