forked from lspector/Clojush
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathafter_success.sh
executable file
·34 lines (28 loc) · 1.03 KB
/
after_success.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o xtrace
set -o pipefail
# exit if not on master branch
[ $TRAVIS_BRANCH = master ]
AUTOMATED_AUTHOR_EMAIL=_@_._
AUTOMATED_AUTHOR_NAME=_
LEIN_RELEASE_COMMAND=$(git log --format=%B -n 1 | grep -o 'lein release :[a-z]*')
# exit if no lein release
[ -n "$LEIN_RELEASE_COMMAND" ]
git remote set-url origin https://[email protected]/$TRAVIS_REPO_SLUG.git
git branch --set-upstream-to origin/master master
git config user.name "$AUTOMATED_AUTHOR_NAME"
git config user.email "$AUTOMATED_AUTHOR_EMAIL"
git config push.default simple
# the next lines are commented out because docs seem to fail to build
# https://travis-ci.org/lspector/Clojush/builds/279236960#L1689
# we can fix this if anyone starts using the auto generated docs
# dont output all of lein codox, because its overly long because it tries
# to run experiments
# lein codox 2>&1 | head -n 100
# git pull origin gh-pages
# ./scripts/deploy-docs.sh --verbose
git checkout master
git pull origin master
eval $LEIN_RELEASE_COMMAND