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}
7 REPONAME
=${TRAVIS_REPO_SLUG:=$USER/undefined}
8 BUILDNAME
=${BUILDNAME:=travis}
11 # A hacky way of running the unit tests at the same time as the normal builds.
12 if [ $RUNTESTS ] ; then
13 cd .
/src
/test && make test
15 # A hacky way of building the docs at the same time as the normal builds.
16 elif [ $PUBLISHDOCS ] ; then
17 if [ $PUBLISH_URL ] ; then
19 sudo apt-get
install zlib1g-dev libssl-dev wkhtmltopdf libxml2-dev libxslt-dev
#ruby-rvm
21 # Patch Gimli to fix underscores_inside_words
22 curl
-L https
://github.com
/walle
/gimli
/archive
/v0.5
.9.
tar.gz |
tar zxf
-
24 sed -i 's/).render(/, :no_intra_emphasis => true).render(/' gimli-0.5
.9/ext
/github_markup.rb
27 gem build gimli.gemspec
&& rvmsudo gem
install gimli
33 --form "manual=@docs/Manual.pdf" \
34 --form "revision=${REVISION}" \
35 --form "branch=${BRANCH}" \
36 --form "last_commit_date=${LAST_COMMIT_DATE}" \
37 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \
38 --form "github_repo=${REPONAME}" \
39 --form "build_name=${BUILDNAME}" \
43 elif [ $PUBLISHMETA ] ; then
44 if [ $PUBLISH_URL ] ; then
45 RECENT_COMMITS
=$
(git shortlog
-n25)
47 --form "recent_commits=${RECENT_COMMITS}" \
48 --form "revision=${REVISION}" \
49 --form "branch=${BRANCH}" \
50 --form "last_commit_date=${LAST_COMMIT_DATE}" \
51 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \
52 --form "github_repo=${REPONAME}" \
53 --form "build_name=${BUILDNAME}" \
58 if [ $PUBLISH_URL ] ; then
60 if [ -f ${TARGET_FILE}.bin
] ; then
61 TARGET_FILE
=${TARGET_FILE}.bin
62 elif [ -f ${TARGET_FILE}.hex
] ; then
63 TARGET_FILE
=${TARGET_FILE}.hex
65 echo "build artifact (hex or bin) for ${TARGET_FILE} not found, aborting";
70 --form "file=@${TARGET_FILE}" \
71 --form "revision=${REVISION}" \
72 --form "branch=${BRANCH}" \
73 --form "last_commit_date=${LAST_COMMIT_DATE}" \
74 --form "travis_build_number=${TRAVIS_BUILD_NUMBER}" \
75 --form "github_repo=${REPONAME}" \
76 --form "build_name=${BUILDNAME}" \