upload_binaries.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/sh
  2. ## Copyright (c) 2014 Minoca Corp.
  3. ##
  4. ## This file is licensed under the terms of the GNU General Public License
  5. ## version 3. Alternative licensing terms are available. Contact
  6. ## info@minocacorp.com for details. See the LICENSE file at the root of this
  7. ## project for complete licensing information..
  8. ##
  9. ## Script Name:
  10. ##
  11. ## upload_binaries.sh
  12. ##
  13. ## Abstract:
  14. ##
  15. ## This script uploads the bin archive. SRCROOT, ARCH and DEBUG must be set.
  16. ##
  17. ## Author:
  18. ##
  19. ## Evan Green 14-May-2014
  20. ##
  21. ## Environment:
  22. ##
  23. ## Minoca (Windows) Build
  24. ##
  25. set -e
  26. SAVE_IFS="$IFS"
  27. IFS='
  28. '
  29. export SRCROOT=`echo $SRCROOT | sed 's_\\\\_/_g'`
  30. IFS="$SAVE_IFS"
  31. unset SAVE_IFS
  32. if test -z $SRCROOT; then
  33. echo "SRCROOT must be set."
  34. exit 1
  35. fi
  36. if test -z $ARCH; then
  37. echo "ARCH must be set."
  38. exit 1
  39. fi
  40. if test -z $DEBUG; then
  41. echo "DEBUG must be set."
  42. exit 1
  43. fi
  44. export TMPDIR=$PWD
  45. export TEMP=$TMPDIR
  46. OUTROOT=$SRCROOT/$ARCH$VARIANT$DEBUG
  47. export PATH="$SRCROOT/tools/win32/mingw/bin;$OUTROOT/tools/bin;$OUTROOT/testbin;$SRCROOT/tools/win32/scripts;$SRCROOT/tools/win32/swiss;$SRCROOT/tools/win32/bin;$SRCROOT/tools/win32/ppython/app;$SRCROOT/tools/win32/ppython/App/Scripts;$PATH"
  48. file=minoca-bin-${ARCH}${VARIANT}${DEBUG}-win32.tar.gz
  49. file_size=`ls -l $file | \
  50. sed -n 's/[^ ]* *[^ ]* *[^ ]* *[^ ]* *\([0123456789]*\).*/\1/p'`
  51. python $SRCROOT/client.py --result "Windows Binaries Size" integer "$file_size"
  52. python $SRCROOT/client.py --upload schedule $file $file
  53. echo Uploaded file $file, size $file_size
  54. rm $file