update the source code

This commit is contained in:
Chao Xu
2015-10-16 11:30:00 -07:00
parent a6634adc1c
commit a3cbf49ea4
3 changed files with 24 additions and 15 deletions

View File

@@ -20,13 +20,10 @@ set -o errexit
set -o nounset
set -o pipefail
echo $1
echo $2
cd /build/
wget "$1" -O input.json
wget "$2" -O register.go
wget "$2" -O input.json
wget "$3" -O register.go
./gradle-2.5/bin/gradle gendocs --info
@@ -36,9 +33,9 @@ top_level_models=$(grep IsAnAPIObject ./register.go | sed 's/func (\*\(.*\)) IsA
| tr -d '()' | tr -d '{}' | tr -d ' ')
for m in $top_level_models
do
if grep -xq "=== v1.$m" ./definitions.adoc
if grep -xq "=== $1.$m" ./definitions.adoc
then
buf+="* <<v1."$m">>\n"
buf+="* <<$1."$m">>\n"
fi
done
sed -i "1i $buf" ./definitions.adoc