From: Wolfram Schneider Date: Thu, 27 Feb 2014 15:04:38 +0000 (+0000) Subject: fetch pz2.js from git.indexdata.com as we do for jquery libs. MKWS-131 X-Git-Tag: 1.0.0~1390^2~2^2 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=429fc950d86e78aed8de8896094834f8d2a18ab3;ds=sidebyside fetch pz2.js from git.indexdata.com as we do for jquery libs. MKWS-131 --- diff --git a/Makefile b/Makefile index 3c1dfa6..f58f93f 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,6 @@ all: ${MAKE} -C./tools/htdocs $@ -pz2api-git-checkout: - ${MAKE} -C./tools/htdocs $@ - clean distclean: ${MAKE} -C./tools/htdocs $@ ${MAKE} -C./examples/htdocs $@ @@ -17,7 +14,7 @@ phantomjs: ${MAKE} -C./test $@ # must be called once after GIT checkout -setup: pz2api-git-checkout +setup: ${MAKE} -C./tools/htdocs mkws-js-min ${MAKE} -C./examples/htdocs jasmine-links ${MAKE} -C./test node-modules @@ -26,5 +23,5 @@ check: setup check-js help: @echo "make [ all | setup | clean | distclean ]" - @echo " [ pz2api-git-checkout | check-js ]" + @echo " [ check | check-js | phantomjs ]" diff --git a/tools/htdocs/Makefile b/tools/htdocs/Makefile index 68278ad..81b8af3 100644 --- a/tools/htdocs/Makefile +++ b/tools/htdocs/Makefile @@ -17,16 +17,15 @@ JQUERY_UI_URL= http://code.jquery.com/ui/1.10.3/jquery-ui.js #JQUERY_UI_URL= http://code.jquery.com/ui/1.8.0/jquery-ui.min.js JQUERY_JSON_URL= https://jquery-json.googlecode.com/files/jquery.json-2.4.js HANDLEBARS_URL= http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.1.2.js -o $@ +PP2_URL= http://git.indexdata.com/?p=pazpar2.git;a=blob_plain;f=js/pz2.js;hb=HEAD VERSION = $(shell tr -d '\012' < VERSION) MKWS_JS= mkws-complete.js -PZ2API_JS= ../../../pazpar2/js/pz2.js -PZ2API_GIT= ssh://git.indexdata.com:222/home/git/pub/pazpar2 JQUERY_FILE := $(shell basename ${JQUERY_URL}) JQUERY_JSON_FILE := $(shell basename ${JQUERY_JSON_URL}) HANDLEBARS_FILE := $(shell basename ${HANDLEBARS_URL}) -PP2_FILE := $(shell basename ${PZ2API_JS}) +PP2_FILE = pz2.js ############################## DOCS = README.html README.odt README.pdf \ @@ -39,27 +38,13 @@ all: ${MKWS_JS} mkws-js-min $(DOCS) docs: $(DOCS) -pz2api-git-checkout: - @if ! test -e ${PZ2API_JS}; then \ - ( cd ../../.. && git clone ${PZ2API_GIT} ); \ - fi - mkws-js ${MKWS_JS}: Makefile mkws.js ${JQUERY_FILE} ${JQUERY_JSON_FILE} ${HANDLEBARS_FILE} ${PP2_FILE} - @if ! test -e ${PZ2API_JS}; then \ - echo "The pazpar2 JS file ${PZ2API_JS} does not exists."; \ - echo "Did you checked out the source from the git repo?"; \ - echo ""; \ - echo "Please run:"; \ - echo "$$ make pz2api-git-checkout"; \ - echo ""; \ - exit 1; \ - fi ( set -e; \ echo "/*! Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com"; \ echo " Licence: GPL, http://www.indexdata.com/licences/gpl"; \ echo " created at: $$(date)"; \ echo " mkws.js GIT id: $$(git log mkws.js | head -n 1 | perl -npe 's,\S+\s+,,')"; \ - echo " $$(basename ${PZ2API_JS}) GIT id: $$(cd $$(dirname ${PZ2API_JS}) && git log $$(basename ${PZ2API_JS}) | head -n 1 | perl -npe 's,\S+\s+,,')"; \ + echo " pz2.js GIT id: $$(curl -sSf 'http://git.indexdata.com/?p=pazpar2.git;a=rss' | egrep ',')"; \ echo "*/"; \ cat ${JQUERY_FILE}; \ cat ${JQUERY_JSON_FILE}; \ @@ -91,8 +76,9 @@ ${JQUERY_JSON_FILE}: ${HANDLEBARS_FILE}: curl -sSf ${HANDLEBARS_URL} -o $@ -${PP2_FILE}: ${PZ2API_JS} - cp -pf ${PZ2API_JS} $@ +${PP2_FILE}: + curl -sSf "${PP2_URL}" -o $@.tmp + mv -f $@.tmp $@ release: mkws.js mkws-complete.js mkws.min.js mkws-complete.min.js @if [ -f releases/mkws-$(VERSION).js ]; then \