Skip to content

Commit

Permalink
Merge pull request #24 from samoht/master
Browse files Browse the repository at this point in the history
Add doc and release runes in Makefile
  • Loading branch information
samoht committed Nov 17, 2015
2 parents aa64df7 + 1444f93 commit 8962c56
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Makefile
Expand Up @@ -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)

0 comments on commit 8962c56

Please sign in to comment.