blob: c9f4c80156c638ef2fbdd6be4a975a2c35040fe5 [file] [log] [blame]
#!/bin/bash
# -----------------------------------------------------------------------------
# Uploads ONOS distributable bits.
# -----------------------------------------------------------------------------
set -e
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
#FIXME need to export s3Creds
# Stage the onos tar in /tmp
rm -f $ONOS_TAR
cp $(onos-buck build onos --show-output | tail -1 | cut -d\ -f2) $ONOS_TAR
# Repackage the onos tar
pushd /tmp/
tar xf onos-$ONOS_VERSION.tar.gz
rm -f onos-$ONOS_VERSION.zip
zip -r onos-$ONOS_VERSION.zip onos-$ONOS_VERSION/
popd
# Stage the test bits tar in /tmp
rm -f $ONOS_TEST_TAR
cp $(onos-buck build //:onos-test --show-output | tail -1 | cut -d\ -f2) $ONOS_TEST_TAR
onosUploadBits.py $ONOS_VERSION