-
Notifications
You must be signed in to change notification settings - Fork 124
/
build-docs.sh
executable file
·29 lines (25 loc) · 1.05 KB
/
build-docs.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
#!/bin/sh
# This script will build the javadocs for the DHF jar file
# and push them into the docs branch to be magically published
# via travis to the https://marklogic.github.io/marklogic-data-hub site
# run this after you update gradle.properties to contain the new version
# preferable after you do a release
#
# this script will create a new branch add-${hubversion}-javadocs
# you will need to create a Pull Request and review it/approve/merge
# travis will then update the docs site
tmpdir=$(mktemp -d)
hubversion=$(cat gradle.properties | awk -F"=" '{print $2}')
echo "tmpdir: ${tmpdir}"
echo "version: ${hubversion}"
git clone -b docs [email protected]:marklogic/marklogic-data-hub.git ${tmpdir}/docs
./gradlew javadoc
mkdir -p ${tmpdir}/docs/javadocs/${hubversion}
cp -R marklogic-data-hub/build/docs/javadoc ${tmpdir}/docs/javadocs/${hubversion}
cd ${tmpdir}/docs
branch_name=add-${hubversion}-javadocs
git checkout -b ${branch_name}
git add javadocs/${hubversion}
git commit -m "adding ${hubversion} javadocs"
git push origin ${branch_name}
rm -rf ${tmpdir}