upload_binaries.sh 1.3 KB

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