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