2 REVISION
=$
(git rev-parse
--short HEAD
)
3 BRANCH
=$
(git rev-parse
--abbrev-ref HEAD
)
4 REVISION
=$
(git rev-parse
--short HEAD
)
5 LAST_COMMIT_DATE
=$
(git log
-1 --date=short
--format="%cd")
6 TARGET_FILE
=obj
/cleanflight_
${TARGET}
8 # A hacky way of running the unit tests at the same time as the normal builds.
9 if [ $RUNTESTS ] ; then
10 cd .
/src
/test && make test
12 # A hacky way of running the unit tests at the same time as the normal builds.
13 elif [ $PUBLISHDOCS ] ; then
14 if [ $PUBLISH_URL ] ; then
16 sudo apt-get
install zlib1g-dev libssl-dev wkhtmltopdf libxml2-dev libxslt-dev
#ruby-rvm
17 rvmsudo gem
install gimli
22 --form "manual=@docs/Manual.pdf" \
23 --form "revision=${REVISION}" \
24 --form "branch=${BRANCH}" \
25 --form "last_commit_date=${LAST_COMMIT_DATE}" \
26 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \
30 elif [ $PUBLISHMETA ] ; then
31 if [ $PUBLISH_URL ] ; then
32 RECENT_COMMITS
=$
(git shortlog
-n25)
34 --form "recent_commits=${RECENT_COMMITS}" \
35 --form "revision=${REVISION}" \
36 --form "branch=${BRANCH}" \
37 --form "last_commit_date=${LAST_COMMIT_DATE}" \
38 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \
43 if [ $PUBLISH_URL ] ; then
45 if [ -f ${TARGET_FILE}.bin
] ; then
46 TARGET_FILE
=${TARGET_FILE}.bin
47 elif [ -f ${TARGET_FILE}.hex
] ; then
48 TARGET_FILE
=${TARGET_FILE}.hex
50 echo "build artifact (hex or bin) for ${TARGET_FILE} not found, aborting";
55 --form "file=@${TARGET_FILE}" \
56 --form "revision=${REVISION}" \
57 --form "branch=${BRANCH}" \
58 --form "last_commit_date=${LAST_COMMIT_DATE}" \
59 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \