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 building the docs 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
18 # Patch Gimli to fix underscores_inside_words
19 curl
-L https
://github.com
/walle
/gimli
/archive
/v0.5
.9.
tar.gz |
tar zxf
-
21 sed -i 's/).render(/, :no_intra_emphasis => true).render(/' gimli-0.5
.9/ext
/github_markup.rb
24 gem build gimli.gemspec
&& rvmsudo gem
install gimli
30 --form "manual=@docs/Manual.pdf" \
31 --form "revision=${REVISION}" \
32 --form "branch=${BRANCH}" \
33 --form "last_commit_date=${LAST_COMMIT_DATE}" \
34 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \
38 elif [ $PUBLISHMETA ] ; then
39 if [ $PUBLISH_URL ] ; then
40 RECENT_COMMITS
=$
(git shortlog
-n25)
42 --form "recent_commits=${RECENT_COMMITS}" \
43 --form "revision=${REVISION}" \
44 --form "branch=${BRANCH}" \
45 --form "last_commit_date=${LAST_COMMIT_DATE}" \
46 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \
51 if [ $PUBLISH_URL ] ; then
53 if [ -f ${TARGET_FILE}.bin
] ; then
54 TARGET_FILE
=${TARGET_FILE}.bin
55 elif [ -f ${TARGET_FILE}.hex
] ; then
56 TARGET_FILE
=${TARGET_FILE}.hex
58 echo "build artifact (hex or bin) for ${TARGET_FILE} not found, aborting";
63 --form "file=@${TARGET_FILE}" \
64 --form "revision=${REVISION}" \
65 --form "branch=${BRANCH}" \
66 --form "last_commit_date=${LAST_COMMIT_DATE}" \
67 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \