From a1c928e70cd995426449ac6ec6df3b5a492580e5 Mon Sep 17 00:00:00 2001 From: Nikolai Aleksandrovich Pavlov Date: Fri, 31 Mar 2017 15:32:58 +0300 Subject: ci: Do not hide ci directory (#6410) --- ci/before_script.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 ci/before_script.sh (limited to 'ci/before_script.sh') diff --git a/ci/before_script.sh b/ci/before_script.sh new file mode 100755 index 0000000000..4a75e89fbe --- /dev/null +++ b/ci/before_script.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +if [[ -n "${CI_TARGET}" ]]; then + exit +fi + +CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +source "${CI_DIR}/common/build.sh" + +# Test some of the configuration variables. +if [[ -n "${GCOV}" ]] && [[ ! $(type -P "${GCOV}") ]]; then + echo "\$GCOV: '${GCOV}' is not executable." + exit 1 +fi +if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; then + echo "\$LLVM_SYMBOLIZER: '${LLVM_SYMBOLIZER}' is not executable." + exit 1 +fi + +if [[ "${TRAVIS_OS_NAME}" == osx ]]; then + # Adds user to a dummy group. + # That allows to test changing the group of the file by `os_fchown`. + sudo dscl . -create /Groups/chown_test + sudo dscl . -append /Groups/chown_test GroupMembership "${USER}" +fi + +# Compile dependencies. +build_deps + +rm -rf "${LOG_DIR}" +mkdir -p "${LOG_DIR}" -- cgit From d9069b9fe490e3be3ac06985f7f8625af51d5129 Mon Sep 17 00:00:00 2001 From: ZyX Date: Fri, 31 Mar 2017 17:39:18 +0300 Subject: ci: Check for exact value of CI_TARGET, not its emptyness --- ci/before_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci/before_script.sh') diff --git a/ci/before_script.sh b/ci/before_script.sh index 4a75e89fbe..445996a8df 100755 --- a/ci/before_script.sh +++ b/ci/before_script.sh @@ -3,7 +3,7 @@ set -e set -o pipefail -if [[ -n "${CI_TARGET}" ]]; then +if [[ "${CI_TARGET}" == lint ]]; then exit fi -- cgit