Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: bb9098cb66
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 29 lines (24 sloc) 0.927 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
.PHONY : clean build-min docs

VERSION = $(shell cat version.txt)
BRANCH = $(shell git branch | grep \* | cut -d' ' -f 2)
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.${VERSION}.js
@closure-compiler < ./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.${VERSION}.js
@cp -f ./docs/locache.${VERSION}.html ./docs/locache.html

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};
Something went wrong with that request. Please try again.