Merge branch 'travis_upload' of github.com:pulsar256/cleanflight into travis_upload

This commit is contained in:
Paul Rogalinski 2015-04-01 16:05:38 +02:00
commit 35f3306efd
1 changed files with 27 additions and 0 deletions

View File

@ -24,26 +24,53 @@ elif [ $PUBLISHMETA ] && [ $PUBLISH_URL ] ; then
${PUBLISH_URL} ${PUBLISH_URL}
else else
if [ $PUBLISH_URL ] ; then if [ $PUBLISH_URL ] ; then
<<<<<<< HEAD
make -j4 make -j4
if [ -f ${TARGET_FILE}.bin ] ; then if [ -f ${TARGET_FILE}.bin ] ; then
TARGET_FILE=${TARGET_FILE}.bin TARGET_FILE=${TARGET_FILE}.bin
elif [ -f ${TARGET_FILE}.hex ] ; then elif [ -f ${TARGET_FILE}.hex ] ; then
=======
make -j2
BRANCH=$(git rev-parse --abbrev-ref HEAD)
REVISION=$(git rev-parse --short HEAD)
RECENT_COMMITS=$(git shortlog -n25)
TARGET_FILE=obj/cleanflight_${TARGET}
if [ -f ${TARGET_FILE}.bin ];
then
TARGET_FILE=${TARGET_FILE}.bin
elif [ -f ${TARGET_FILE}.hex ];
then
>>>>>>> 483c62a5852c91099b286a69a669f1a13584eac4
TARGET_FILE=${TARGET_FILE}.hex TARGET_FILE=${TARGET_FILE}.hex
else else
echo "build artifact (hex or bin) for ${TARGET_FILE} not found, aborting"; echo "build artifact (hex or bin) for ${TARGET_FILE} not found, aborting";
exit 1 exit 1
<<<<<<< HEAD
fi fi
=======
fi
>>>>>>> 483c62a5852c91099b286a69a669f1a13584eac4
curl \ curl \
--form "file=@${TARGET_FILE}" \ --form "file=@${TARGET_FILE}" \
--form "revision=${REVISION}" \ --form "revision=${REVISION}" \
--form "branch=${BRANCH}" \ --form "branch=${BRANCH}" \
<<<<<<< HEAD
--form "last_commit_date=${LAST_COMMIT_DATE}" \ --form "last_commit_date=${LAST_COMMIT_DATE}" \
--form "travis_job_id=${TRAVIS_JOB_ID}" \ --form "travis_job_id=${TRAVIS_JOB_ID}" \
${PUBLISH_URL} ${PUBLISH_URL}
else else
make -j2 make -j2
fi fi
=======
--form "recent_commits=${RECENT_COMMITS}" ${PUBLISH_URL}
else
make -j2
fi
>>>>>>> 483c62a5852c91099b286a69a669f1a13584eac4
fi fi