forked from synthetichealth/synthea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
38 lines (28 loc) · 1.03 KB
/
deploy.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
35
36
37
38
#!/bin/bash
# --------------------------------------------------------------------------
# This script deploys rendered graphs of the Synthea modules and the
# Synthea binary distribution to github pages
# --------------------------------------------------------------------------
set -o errexit -o nounset
if [ "$TRAVIS_BRANCH" != "master" ]
then
echo "Skipping publication of module graphs for non-master branches."
exit 0
fi
rev=$(git rev-parse --short HEAD)
./gradlew graphviz uberJar javadoc
mkdir -p output/build/libs
mv build/libs/*.jar output/build/libs
mkdir -p output/build/javadoc
mv build/docs/javadoc/* output/build/javadoc
cd output
git init
git config user.name "Jason Walonoski"
git config user.email "[email protected]"
git remote add upstream "https://[email protected]/synthetichealth/synthea.git"
git fetch upstream gh-pages
git reset upstream/gh-pages
# echo "synthea.org" > CNAME
git add -A graphviz build
git commit -m "rebuild graphs, javadoc and binary distribution at ${rev}"
git push -q upstream HEAD:gh-pages