summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Maupetit <julien@tailordev.fr>2016-02-09 18:37:32 +0100
committerJulien Maupetit <julien@tailordev.fr>2016-02-09 18:37:32 +0100
commit47c8c08d1e5acf39f225c8fb0b80b8a70f9b61d6 (patch)
tree66ef069388b8c1014ea124e22d5c0a8afa58bb47
parentac9e48180e6942324a33df2c3155897c6b461a77 (diff)
-rw-r--r--.travis.yml4
-rw-r--r--Makefile27
2 files changed, 23 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 70f5e00..a9dd76c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,10 +7,10 @@ env:
global:
# - DEPLOY_DOCS: "$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- DEPLOY_DOCS: "true"
- - GH_USER_NAME: "Julien Maupetit"
+ - GH_USER_NAME: "TravisCI"
- GH_USER_EMAIL: julien@tailordev.fr
- GH_REF: github.com/TailorDev/Watson.git
- - secure: "aTFUX0aWro16NzV3yEPnz/VR2O7g6eojnGb9ggsrrZwlRHFR9fSdgVpvETKclGrZtTSEOyO6CCUKhS8R0Kzm8vUF1xtqWjbFWWq8jrwZiXWYmibqA9AnFmfczFnTarJVH0JxdgEj77do8zuau2oIG0VdMjPixc62A5MH+SZ2sZ8="
+ - secure: "DV+BkyLB5GxeIcxUvEpVcqXxkAZz12HhSqccFuea1EQhQ9dIxcuhUzS6jUhaYgQF9KhncgIplo10cC3DUjFVTwQVCoiWWME0tg+WGjWGBSJQPhcAZTvQ17upPEkSDaR8UPBq8bGeCggi1w9zLklukCccatUedqxy4YB35Eo60pc="
matrix:
# - TOX_ENV: flake8
- TOX_ENV: mkdocs
diff --git a/Makefile b/Makefile
index c645cd1..fa73f52 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,25 @@
# Watson
+# git repository setup
+# (used to automate travis-ci gh-pages deploy)
+ifndef ($(git config user.name))
+ ifdef $(GH_USER_NAME)
+ git config user.name $(GH_USER_NAME)
+ endif
+endif
+
+ifndef ($(git config user.email))
+ ifdef $(GH_USER_EMAIL)
+ git config user.email $(GH_USER_EMAIL)
+ endif
+endif
+
+ifdef ($(GH_TOKEN))
+ ifdef ($(GH_REF))
+ git remote add upstream "https://$(GH_TOKEN)@$(GH_REF)"
+ endif
+endif
+
all: install
install:
@@ -20,11 +40,6 @@ docs: install-dev
python scripts/gen-cli-docs.py
mkdocs build
-ghp-setup:
- if [[ -z `git config user.name` && $(GH_USER_NAME) ]] ; then git config user.name $(GH_USER_NAME) ; fi
- if [[ -z `git config user.email` && $(GH_USER_EMAIL) ]] ; then git config user.email $(GH_USER_EMAIL) ; fi
- if [[ $(GH_TOKEN) && $(GH_REF) ]] ; then git remote add upstream "https://$(GH_TOKEN)@$(GH_REF)" ; fi
-
-gh-deploy: docs ghp-setup
+gh-deploy: docs
mkdocs gh-deploy -r upstream
git log -n 2 upstream/gh-pages