Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Uploads ONOS distributable bits. |
| 4 | # ----------------------------------------------------------------------------- |
Brian O'Connor | f5d9363 | 2015-09-04 20:18:31 -0700 | [diff] [blame] | 5 | |
| 6 | set -e |
| 7 | |
Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame] | 8 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 9 | . $ONOS_ROOT/tools/build/envDefaults |
| 10 | |
Brian O'Connor | 6b30e1b | 2015-03-11 16:44:16 -0700 | [diff] [blame] | 11 | #FIXME need to export s3Creds |
Thomas Vachuska | 683b31b | 2015-01-26 11:54:31 -0800 | [diff] [blame] | 12 | |
Thomas Vachuska | be1a196 | 2016-10-25 16:59:29 -0700 | [diff] [blame] | 13 | # Stage the onos tar in /tmp |
| 14 | rm -f $ONOS_TAR |
| 15 | cp $(onos-buck build onos --show-output | tail -1 | cut -d\ -f2) $ONOS_TAR |
| 16 | |
| 17 | # Repackage the onos tar |
| 18 | pushd /tmp/ |
| 19 | tar xf onos-$ONOS_VERSION.tar.gz |
| 20 | rm -f onos-$ONOS_VERSION.zip |
| 21 | zip -r onos-$ONOS_VERSION.zip onos-$ONOS_VERSION/ |
| 22 | popd |
| 23 | |
| 24 | # Stage the test bits tar in /tmp |
| 25 | rm -f $ONOS_TEST_TAR |
| 26 | cp $(onos-buck build //:onos-test --show-output | tail -1 | cut -d\ -f2) $ONOS_TEST_TAR |
| 27 | |
Ray Milkey | e26cf8e | 2016-11-22 17:25:42 -0800 | [diff] [blame^] | 28 | onosUploadBits.py ${ONOS_VERSION%-*} |