axmol/tools/release/generate_docs.sh

27 lines
584 B
Bash
Raw Normal View History

2014-12-24 16:40:14 +08:00
#!/bin/sh
CONFIG_NAME=doxygen
if [ ! -z $1 ]; then
CONFIG_NAME=$1
fi
2014-12-24 16:40:14 +08:00
sed -i .bak '/CC_DEPRECATED_ATTRIBUTE CC_DLL/,/NS_CC_END/d' ../../cocos/base/ccUTF8.h
2021-10-27 10:27:46 +08:00
version=`grep -e 'return' ../../cocos/adxe.cpp | awk '{print substr($3,0,length($3)-2)}'`
2014-12-24 16:40:14 +08:00
echo $version
2014-12-24 16:40:14 +08:00
cd ../../docs
2021-10-27 10:27:46 +08:00
#we should read adxe.cpp and retrieve the version number
2014-12-24 16:40:14 +08:00
sed -i .bak "s/3\.0/${version}/g" doxygen.config
doxygen ${CONFIG_NAME}.config
2014-12-24 16:40:14 +08:00
#restore the old doxygen.config
mv doxygen.config.bak doxygen.config
#restore the old ccUTF8.h
mv ../cocos/base/ccUTF8.h.bak ../cocos/base/ccUTF8.h
2014-12-24 16:40:14 +08:00
rm debug.txt