From 78e3f92d5c553e9e04bd6e516a213d21025d6ab8 Mon Sep 17 00:00:00 2001 From: andyque Date: Wed, 24 Dec 2014 16:40:14 +0800 Subject: [PATCH] add generate_docs.sh to tools --- tools/release/generate_docs.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 tools/release/generate_docs.sh diff --git a/tools/release/generate_docs.sh b/tools/release/generate_docs.sh new file mode 100755 index 0000000000..1040fb8efb --- /dev/null +++ b/tools/release/generate_docs.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +#try to grab the doxygen version modified by me +#TODO: if the doxygen is not correct, we should install it manually + + +sed -i .bak '/CC_DEPRECATED_ATTRIBUTE CC_DLL/,/NS_CC_END/d' ../../cocos/base/ccUTF8.h +# git diff > doc-patch.patch +# mv doc-patch.patch docs +#we need to generate the patch automatically and remove it after applying +# patch -fp1 < docs/doc-patch.patch + + +version=`grep -e 'return' ../../cocos/cocos2d.cpp | awk '{print substr($3,0,length($3)-2)}'` +echo $version +cd ../../docs +#we should read cocos2d.cpp and retrieve the version number +sed -i .bak "s/3\.0/${version}/g" doxygen.config + +rm doxygen.config.bak + +doxygen doxygen.config + +git checkout . ../cocos/base/ccUTF8.h + +rm debug.txt