Permalink
Browse files

Improved building.

  • Loading branch information...
1 parent 5e94611 commit 19fd9a0046d9f88dd9b1b405ad94ba3d4f532068 @d0ugal d0ugal committed Apr 9, 2012
Showing with 1,132 additions and 9 deletions.
  1. +16 −6 Makefile
  2. +364 −0 build/locache.0.1.0.js
  3. +77 −0 build/locache.0.1.0.min.js
  4. +364 −0 build/locache.js
  5. +77 −0 build/locache.min.js
  6. +221 −0 docs/locache.0.1.0.html
  7. +3 −3 docs/locache.html
  8. +10 −0 index.html
View
@@ -1,19 +1,29 @@
.PHONY : clean build-min docs
VERSION = $(shell cat version.txt)
+BRANCH = `git branch | grep \* | cut -d' ' -f 2`
-build: | clean build-min docs
+build: | build-min docs
build-min:
@echo "Creating minified version."
@mkdir -p ./build
@echo "Marking version ${VERSION}"
- @cat locache.js | sed 's/VERSION-PLACEHOLDER/${VERSION}/' > ./build/locache.js
- @jsmin < ./build/locache.js > ./build/locache.min.js
+ @cat locache.js | sed 's/VERSION-PLACEHOLDER/${VERSION}/' > ./build/locache.${VERSION}.js
+ @jsmin < ./build/locache.${VERSION}.js > ./build/locache.${VERSION}.min.js
+ @cp ./build/locache.${VERSION}.js ./build/locache.js
+ @cp ./build/locache.${VERSION}.min.js ./build/locache.min.js
docs:
@echo "Creating docs"
- @docco ./build/locache.js
+ @docco ./build/locache.${VERSION}.js
+ @cp -f ./docs/locache.${VERSION}.html ./docs/locache.html
-clean:
- @rm -rf ./build
+update-page:
+ @echo "Updating GitHub projct page";
+ @git checkout gh-pages;
+ @echo "Swiched to branch from ${BRANCH}, merging master";
+ @git merge master;
+ @git push origin gh-pages;
+ @echo "Updated. Switching back to ${BRANCH}";
+ @git checkout ${BRANCH};
Oops, something went wrong.

0 comments on commit 19fd9a0

Please sign in to comment.