From 1444f931f6e5bdfe6f9a86b16762df4e4832d719 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 16 Nov 2015 15:55:43 +0000 Subject: [PATCH] Add doc and release runes in Makefile --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Makefile b/Makefile index 3639f14..93addc3 100644 --- a/Makefile +++ b/Makefile @@ -39,3 +39,31 @@ configure: .PHONY: build doc test all install uninstall reinstall clean distclean configure # OASIS_STOP + +init-doc: + mkdir -p gh-pages + cd gh-pages && ( \ + git init && \ + git remote add origin git@github.com:mirage/ocaml-9p.git && \ + git fetch && \ + git checkout gh-pages && \ + git pull) + +gh-pages: doc + rm -f gh-pages/*.html + cd gh-pages && cp ../git.docdir/*.html . + cd gh-pages && git add * && git commit -a -m "Update docs" + cd gh-pages && git push + +VERSION = $(shell grep 'Version:' _oasis | sed 's/Version: *//') +NAME = $(shell grep 'Name:' _oasis | sed 's/Name: *//') +ARCHIVE = https://github.com/mirage/ocaml-9p/archive/$(VERSION).tar.gz + +release: + git tag -a $(VERSION) -m "Version $(VERSION)." + git push upstream $(VERSION) + $(MAKE) pr + +pr: + opam publish prepare $(NAME).$(VERSION) $(ARCHIVE) + OPAMPUBLISHBYPASSCHECKS=1 OPAMYES=1 opam publish submit $(NAME).$(VERSION) && rm -rf $(NAME).$(VERSION)