From 272df570e7536e4115db604f939e6c9af4ce2489 Mon Sep 17 00:00:00 2001 From: Trevor Elliott Date: Tue, 18 Jun 2013 13:34:51 -0700 Subject: Add generate and deploy targets to push extensions to gh-pages --- Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 017649b..2cb7956 100644 --- a/Makefile +++ b/Makefile @@ -80,3 +80,41 @@ $(eval $(call subdir,src/batchtools)) $(eval $(call subdir,profiles)) $(eval $(call subdir,doc)) + + +# Package Deployment ########################################################### + +ifeq "$(git-cmd)" "" +$(call strict-error,"unable to locate git") +else + +remote-url := $(shell $(git-cmd) config remote.origin.url) + +$(build-dir)/gh-pages: $(topdir)/.git/index | $(build-dir) + $(call label,CLONE $(call drop-prefix,$@))\ + ( $(git-cmd) clone $(if $(Q),-q) $(topdir) $@ \ + && cd $@ \ + && $(git-cmd) remote set-url origin $(remote-url) \ + && $(git-cmd) fetch $(if $(Q),-q) origin \ + && $(git-cmd) checkout $(if $(Q),-q) gh-pages ) + +$(build-dir)/gh-pages/binaries/%: $(build-dir)/% \ + | $(build-dir)/gh-pages + $(call cmd,cp) + +.PHONY: genereate +generate: $(build-dir)/gh-pages/binaries/fiveui.xpi \ + $(build-dir)/gh-pages/binaries/fiveui.crx + $(call label,GENERATE)\ + ( cd $(build-dir)/gh-pages \ + && $(git-cmd) add binaries \ + && $(git-cmd) add -u binaries \ + && $(git-cmd) commit $(if $(Q),-q) -m "deploy extensions" ) + +.PHONY: deploy +deploy: generate + $(call label,DEPLOY)\ + ( cd $(build-dir)/gh-pages \ + && git push $(if $(Q),-q) origin gh-pages ) + +endif -- cgit v1.2.3