2009-04-26 06:43:27 +02:00
|
|
|
|
2009-05-31 22:56:02 +02:00
|
|
|
VER = `cat version.txt`
|
2009-11-23 05:45:19 +01:00
|
|
|
DATE = `git log -1 | grep Date: | sed 's/[^:]*: *//'`
|
2009-09-08 05:37:35 +02:00
|
|
|
|
|
|
|
JS_SRC_FILES =\
|
|
|
|
main.js\
|
|
|
|
grid.js\
|
2009-10-19 10:53:07 +02:00
|
|
|
agenda.js\
|
2009-09-08 05:37:35 +02:00
|
|
|
view.js\
|
|
|
|
util.js
|
2009-05-31 22:56:02 +02:00
|
|
|
|
2009-09-08 05:37:35 +02:00
|
|
|
CSS_SRC_FILES =\
|
|
|
|
main.css\
|
2009-10-19 10:53:07 +02:00
|
|
|
grid.css\
|
|
|
|
agenda.css
|
2009-09-08 05:37:35 +02:00
|
|
|
|
|
|
|
OTHER_FILES =\
|
|
|
|
src/gcal.js\
|
|
|
|
src/jquery\
|
|
|
|
examples\
|
|
|
|
changelog.txt
|
|
|
|
|
2009-04-26 06:43:27 +02:00
|
|
|
zip:
|
2009-09-08 09:50:23 +02:00
|
|
|
@rm -rf build/fullcalendar
|
|
|
|
@rm -rf build/fullcalendar-*
|
2009-09-16 08:17:37 +02:00
|
|
|
@mkdir -p build/fullcalendar
|
2009-09-08 09:50:23 +02:00
|
|
|
|
|
|
|
@echo "building js & css..."
|
2009-09-16 08:17:37 +02:00
|
|
|
@cd src; cat misc/head.txt ${JS_SRC_FILES} misc/foot.txt > ../build/fullcalendar/fullcalendar.js
|
2009-09-08 09:50:23 +02:00
|
|
|
@cd src/css; cat ${CSS_SRC_FILES} > ../../build/fullcalendar/fullcalendar.css
|
2009-11-23 05:45:19 +01:00
|
|
|
@cp -rt build/fullcalendar ${OTHER_FILES}
|
|
|
|
@for f in build/fullcalendar/*.*; do\
|
2009-09-16 08:17:37 +02:00
|
|
|
sed -i "s/* FullCalendar/& v${VER}/" $$f;\
|
|
|
|
sed -i "s/* Date:/& ${DATE}/" $$f;\
|
|
|
|
done
|
2009-09-08 09:50:23 +02:00
|
|
|
|
2009-09-16 08:17:37 +02:00
|
|
|
@echo "compressing js..."
|
|
|
|
@java -jar build/yuicompressor-2.4.2.jar -o build/fullcalendar/fullcalendar.min.js build/fullcalendar/fullcalendar.js
|
2009-09-08 09:50:23 +02:00
|
|
|
|
|
|
|
@echo "building examples..."
|
2009-09-16 08:17:37 +02:00
|
|
|
@for f in build/fullcalendar/examples/*.html; do\
|
|
|
|
sed -i -n '1h;1!H;$${;g;s/<!--\s*<src>.*<\/src>\s*-->\s*//g;p;}' $$f;\
|
|
|
|
sed -i -n '1h;1!H;$${;g;s/<!--\s*<dist>\s*//g;p;}' $$f;\
|
|
|
|
sed -i -n '1h;1!H;$${;g;s/<\/dist>\s*-->\s*//g;p;}' $$f;\
|
2009-09-08 09:50:23 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
@echo "zipping..."
|
|
|
|
@mv build/fullcalendar build/fullcalendar-${VER}
|
2009-09-16 08:17:37 +02:00
|
|
|
@cd build; for f in fullcalendar-*; do\
|
|
|
|
zip -q -r $$f.zip $$f;\
|
|
|
|
done
|
2009-09-08 09:50:23 +02:00
|
|
|
@mv build/fullcalendar-${VER} build/fullcalendar
|
|
|
|
|
|
|
|
@mkdir -p dist
|
|
|
|
@mv build/fullcalendar-${VER}.zip dist
|
|
|
|
@echo "done."
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm -rf build/fullcalendar
|
|
|
|
@rm -rf build/fullcalendar-*
|
|
|
|
@rm -rf dist/*
|
2009-11-23 05:45:19 +01:00
|
|
|
|