blob: f74a13fffb12f8db6389a66ced379dd37879e8d4 [file] [log] [blame]
Thomas Vachuska683b31b2015-01-26 11:54:31 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Uploads ONOS Java API docs.
4# -----------------------------------------------------------------------------
5
Brian O'Connorf5d93632015-09-04 20:18:31 -07006set -e
7
Thomas Vachuska683b31b2015-01-26 11:54:31 -08008[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
9. $ONOS_ROOT/tools/build/envDefaults
10
11user=${1:-jenkins}
12remote=$user@wiki.onosproject.org
13
14scp $ONOS_ROOT/docs/target/onos-apidocs-$ONOS_VERSION.tar.gz $remote:/tmp
15ssh $remote "
16 mkdir -p /var/www/api/$ONOS_VERSION
17 cd /var/www/api/$ONOS_VERSION
18 tar zxf /tmp/onos-apidocs-$ONOS_VERSION.tar.gz
19 mv onos-apidocs-$ONOS_VERSION/* .
20 rm -rf onos-apidocs-$ONOS_VERSION
21
22 # TODO: optionally bump /var/www/api/index.html
23"