Revision: 750
Author:
damon...@gmail.com
Date: Tue Aug 7 10:49:56 2012
Log: Cleanup of build process
http://code.google.com/p/caffeine-hx/source/detail?r=750
Deleted:
/trunk/projects/chxdoc/bin
/trunk/projects/chxdoc/utils/temploc.n
Modified:
/trunk/projects/chxdoc/Makefile
/trunk/projects/chxdoc/make_release.sh
=======================================
--- /trunk/projects/chxdoc/utils/temploc.n Fri Jan 9 02:14:16 2009
+++ /dev/null
Binary file, no diff available.
=======================================
--- /trunk/projects/chxdoc/Makefile Sun Jul 29 14:57:38 2012
+++ /trunk/projects/chxdoc/Makefile Tue Aug 7 10:49:56 2012
@@ -11,19 +11,19 @@
test-developer: chxdoc
cd test && haxe chx.hxml
- cd test && ../chxdoc -v -f flash.utils -f js.Boot -o doc_developer
--footerText="This is the <a href=\"
http://www.haxe.org\"
target=\"new\">footer link to
haxe.org</a>" --tmpDir=__chxdoctmp
--templateDir=../src/templates/default --installTemplate=true
--developer=true flash9.xml,flash9,flash neko.xml,neko js.xml,js
+ cd test && ../chxdoc --policy allow --deny flash.utils --deny js.Boot
--deny sys.db.* -o doc_developer --footerText="This is the <a
href=\"
http://www.haxe.org\" target=\"new\">footer link to
haxe.org</a>"
--tmpDir=__chxdoctmp --templatesDir=../src/templates --template=default
--installTemplate=true --developer=true -f flash9.xml,flash9,flash -f
neko.xml,neko -f js.xml,js
cd test && $(RM) *.swf *.n *.js
cd test && $(RM) -R __chxdoctmp
test-user: chxdoc
cd test && haxe chx.hxml
- cd test && ../chxdoc -o doc_user --template=../src/templates/default
--developer=false flash9.xml,flash,flash9 neko.xml,neko js.xml,js
+ cd test && ../chxdoc -o doc_user --templatesDir=../src/templates
--template=default --developer=false -f flash9.xml,flash,flash9 -f
neko.xml,neko -f js.xml,js
cd test && $(RM) *.swf *.n *.js
cd test && $(RM) -R __chxdoctmp
test-web: chxdoc
cd test && haxe chx.hxml
- cd test && ../chxdoc -o doc_web --template=../src/templates/default
--developer=false flash9.xml,flash,flash9 neko.xml,neko js.xml,js
--writeWebConfig
+ cd test && ../chxdoc -o doc_web --templatesDir=../src/templates
--template=default --developer=false -f flash9.xml,flash,flash9 -f
neko.xml,neko -f js.xml,js --writeWebConfig
cd test && $(RM) *.swf *.n *.js
cd test && $(RM) -R __chxdoctmp
@@ -36,17 +36,6 @@
rm -f chxdoc.n
rm -rf __chxdoctmp
-haxelib:
- rm -f chxdoc.zip
- rm -rf haxelib_release
- mkdir haxelib_release
- cd src/Tools && haxe build.hxml
- cp -r src haxelib_release/
- cd haxelib_release/src && find . -name "*~" -exec rm {} \;
- cd haxelib_release/src && zip -r ../chxdoc *
- cd haxelib_release && haxelib test chxdoc.zip
- haxelib run chxdoc compile
-
windows: dependencies dummy
wine haxe build.hxml
sh wine nekotools boot chxdoc.n
=======================================
--- /trunk/projects/chxdoc/make_release.sh Sun Jul 29 14:57:38 2012
+++ /trunk/projects/chxdoc/make_release.sh Tue Aug 7 10:49:56 2012
@@ -1,5 +1,7 @@
#!/bin/sh
+set -e
+
VER=$(echo $1)
DIR=chxdoc_$(echo $VER | sed 's/\./_/g')
VERSION=$(echo $VER | sed 's/\./_/g')
@@ -33,33 +35,38 @@
make linux
#make windows
+echo "Creating directories"
mkdir -p chxdoc_release/Windows/$DIR
mkdir -p chxdoc_release/Linux/$DIR
+echo "Installing src"
cp -r src chxdoc_release/
-rm chxdoc_release/src/chxdoc/Settings.hx
-rm -r chxdoc_release/src/templates/ianxm
#readme
+echo "Updating READMEs"
sed 's/\n/\r\n/g' src/README > chxdoc_release/Windows/$DIR/README.txt
cp src/README chxdoc_release/Linux/$DIR/
#chxdoc
-mv chxdoc.exe bin/Windows/
-mv chxdoc bin/Linux/
-cp bin/Windows/chxdoc.exe chxdoc_release/Windows/$DIR/
-cp bin/Linux/chxdoc chxdoc_release/Linux/$DIR/
+echo "Installing windows binary"
+mv chxdoc.exe chxdoc_release/Windows/$DIR/ || {
+ echo "You did not run 'make windows' before release"
+ exit 1;
+}
+echo "Installing linux binary"
+mv chxdoc chxdoc_release/Linux/$DIR/
#templates
+echo "Installing templates to binary distros"
cp -R src/templates chxdoc_release/Windows/$DIR/
cp -R src/templates chxdoc_release/Linux/$DIR/
cd chxdoc_release
-#remove 'devel' template in chxdoc_release
-rm -Rf Linux/$DIR/templates/devel
-rm -Rf Windows/$DIR/templates/devel
+echo "Cleaning distribution"
+
+set +e
#remove .svn directories in chxdoc_release
find . -name ".svn" -exec rm -Rf {} \; 2>/dev/null
@@ -67,7 +74,10 @@
#remove tmp files in chxdoc_release
find . -name "*~" -exec rm {} \;
+set -e
+
#make the haxelib version
+echo "Creating haxelib tools"
cd src/Tools
haxe build.hxml
cd ../
@@ -75,10 +85,12 @@
cd ..
haxelib test chxdoc_lib-${VERSION}.zip
+echo "Packaging linux distribution"
cd Linux
tar -czf ${DIR}_linux.tgz $DIR
mv ${DIR}_linux.tgz ../
+echo "Packaging windows distribution"
cd ../Windows
zip -rq $DIR $DIR
mv ${DIR}.zip ../${DIR}_win.zip