react-native-navigation的迁移库

upload_artifacts.sh 674B

1234567891011121314151617181920212223242526
  1. #!/bin/bash -e
  2. export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY
  3. export AWS_SECRET_ACCESS_KEY=$AWS_ACCESS_SECRET
  4. DATE=`date '+%Y-%m-%d_%H-%M-%S'`
  5. if [ $JENKINS_CI ]; then
  6. ARTIFACTS_NAME="artifacts_${BUILD_ID}_${DATE}.tar.gz"
  7. else
  8. ARTIFACTS_NAME="artifacts_${TRAVIS_BUILD_ID}_${DATE}.tar.gz"
  9. fi
  10. if [ -d "detox/test/artifacts" ]; then
  11. tar cvzf ${ARTIFACTS_NAME} ./detox/test/artifacts/
  12. if [ $JENKINS_CI ]; then
  13. echo "Jenkins has build in plugin"
  14. else
  15. aws s3 cp ${ARTIFACTS_NAME} s3://detox-artifacts/ --region=us-east-1
  16. fi
  17. echo "The artifacts archive is available for download at:"
  18. echo "https://detox-artifacts.s3.amazonaws.com/${ARTIFACTS_NAME}"
  19. fi