aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-14 00:47:14 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-14 00:47:14 +0100
commit2ca363c082367124dae86f36d36da5e5368877e8 (patch)
tree1e83d097406dc8c27161b2289db1112a065d5fac
parent0388614a62dfe7ffaddb1e6a5f19a6473d46484a (diff)
downloadblogc-2ca363c082367124dae86f36d36da5e5368877e8.tar.gz
blogc-2ca363c082367124dae86f36d36da5e5368877e8.tar.bz2
blogc-2ca363c082367124dae86f36d36da5e5368877e8.zip
travis: set extract=true when uploading reports
-rw-r--r--.travis/targets/clang-analyzer.sh4
-rwxr-xr-x.travis/test-run.sh9
2 files changed, 13 insertions, 0 deletions
diff --git a/.travis/targets/clang-analyzer.sh b/.travis/targets/clang-analyzer.sh
index e0c172e..cbbff8c 100644
--- a/.travis/targets/clang-analyzer.sh
+++ b/.travis/targets/clang-analyzer.sh
@@ -36,3 +36,7 @@ deploy() {
FILES=( *.tar.xz )
[[ ${RV} -ne 0 ]] && [[ "x${CC}" = "xclang" ]]
}
+
+extract() {
+ grep .
+}
diff --git a/.travis/test-run.sh b/.travis/test-run.sh
index 3e8a0f9..a723f41 100755
--- a/.travis/test-run.sh
+++ b/.travis/test-run.sh
@@ -25,6 +25,9 @@ BUILD=0
DEPLOY=0
[[ "x$(type -t deploy)" = "xfunction" ]] && DEPLOY=1
+EXTRACT=0
+[[ "x$(type -t extract)" = "xfunction" ]] && EXTRACT=1
+
SOURCE_DIR="$(dirname "${SCRIPT_DIR}")"
BUILD_DIR="${SOURCE_DIR}/build"
@@ -77,6 +80,11 @@ do_sha512() {
popd > /dev/null
}
+do_extract_flag() {
+ [[ ${EXTRACT} -eq 0 ]] && echo false && return 0
+ basename "${1}" | extract &> /dev/null && echo true || echo false
+}
+
do_curl() {
curl \
--silent \
@@ -84,6 +92,7 @@ do_curl() {
--form "version=${PV}" \
--form "file=@${1}" \
--form "sha512=$(do_sha512 ${1})" \
+ --form "extract=$(do_extract_flag ${1})" \
"${DISTFILES_URL}" \
&> /dev/null # make sure that we don't leak tokens
}