VERNO=$(shell rhino -e 'print(JSON.parse(readFile("package.json")).version);') WEBDIR=/home/matej/Dokumenty/website/fedorahosted/ UPSTREAM_XPI_URL=https://fedorahosted.org/released/bugzilla-triage-scripts/bugzilla-triage-$(VERNO).xpi UPDATE_URL=https://fedorahosted.org/released/bugzilla-triage-scripts/update.rdf all: bugzilla-triage-$(VERNO).xpi update.rdf install: local-install make -C $(WEBDIR) websync amo: bugzilla-triage.xpi mv bugzilla-triage.xpi bugzilla-triage.zip unzip -qp bugzilla-triage.zip install.rdf \ |grep -v 'em:updateURL' >temp-install.rdf mv -f temp-install.rdf install.rdf zip -9qmT bugzilla-triage.zip install.rdf mv -f bugzilla-triage.zip bugzilla-triage.xpi local-install: bugzilla-triage.xpi update.rdf rsync -av bugzilla-triage.xpi $(WEBDIR) rsync -av jsons/Config_data.json $(WEBDIR) bugzilla-triage-$(VERNO).xpi: package.json lib/*.js cfx xpi --update-link=$(UPSTREAM_XPI_URL) --update-url=$(UPDATE_URL) tidy -i -xml -utf8 -m bugzilla-triage.update.rdf unzip bugzilla-triage.xpi install.rdf sed -i -e '/maxVer/s/[0-9]\+\./10./' \ -e '/minVer/s/[0-9]\+\./6./' install.rdf sed -i -e '/maxVer/s/[0-9]\+\./10./' \ -e '/minVer/s/[0-9]\+\./6./' bugzilla-triage.update.rdf zip -9mqT bugzilla-triage.xpi install.rdf mv bugzilla-triage.xpi bugzilla-triage-$(VERNO).xpi update.rdf: bugzilla-triage-$(VERNO).xpi tidy -i -xml -utf8 -m update.rdf clean: find . -name \*~ -print -delete rm -f -v *.xpi bugzilla-triage.update.rdf