Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame] | 1 | #!/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 | |
| 9 | user=${1:-jenkins} |
| 10 | remote=$user@wiki.onosproject.org |
| 11 | |
| 12 | scp $ONOS_ROOT/docs/target/onos-apidocs-$ONOS_VERSION.tar.gz $remote:/tmp |
| 13 | ssh $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 | " |