mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
- pulls more of the travis-ci s3 deploy into the repo so we can potentially migrate to another CI system - fixed the sizes output and added verbose compiler version to cmake (#6322) - fixed filenames for firmware uploaded to s3 (was broken by the changes yesterday) - fixed some broken git version display in cmake - Makefile organization - simplified .travis.yml - added a print to know which config the nuttx patch was being applied to - docker_run.sh now respects PX4_DOCKER_REPO for setting the docker image, but defaults to the good production nuttx image
22 lines
681 B
Bash
Executable File
22 lines
681 B
Bash
Executable File
#!/bin/bash
|
|
|
|
filename=${1}
|
|
|
|
# Requires these ENV variables
|
|
# AWS_ACCESS_KEY_ID
|
|
# AWS_SECRET_ACCESS_KEY
|
|
# AWS_S3_BUCKET
|
|
|
|
[ -z "$AWS_ACCESS_KEY_ID" ] && { echo "ERROR: Need to set AWS_ACCESS_KEY_ID"; exit 1; }
|
|
[ -z "$AWS_SECRET_ACCESS_KEY" ] && { echo "ERROR: Need to set AWS_SECRET_ACCESS_KEY"; exit 1; }
|
|
[ -z "$AWS_S3_BUCKET" ] && { echo "ERROR: Need to set AWS_S3_BUCKET"; exit 1; }
|
|
|
|
if [ -f ${filename} ]; then
|
|
base_file_name=`basename $filename`
|
|
short_file_name=${base_file_name#nuttx-}
|
|
s3cmd --access_key=${AWS_ACCESS_KEY_ID} --secret_key=${AWS_SECRET_ACCESS_KEY} put ${filename} s3://${AWS_S3_BUCKET}/${short_file_name}
|
|
else
|
|
echo "ERROR: ${file} doesn't exist"
|
|
exit 1
|
|
fi
|