diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/prepare-commit-msg | 19 | ||||
-rwxr-xr-x | tools/travis-before_install.sh | 1 | ||||
-rwxr-xr-x | tools/travis-install.sh | 1 |
3 files changed, 15 insertions, 6 deletions
diff --git a/tools/prepare-commit-msg b/tools/prepare-commit-msg index e103888a..d2f927c0 100755 --- a/tools/prepare-commit-msg +++ b/tools/prepare-commit-msg @@ -5,11 +5,17 @@ # Add [ci skip] to the commit message unless there are changes to files # that are relevant for testing such as src/*, test/*, ledger3.texi, ... -function add_ci_skip() +add_ci_skip () { pattern="$1"; shift + source="$1" + + # Don't add [ci skip] if it's already in the commit message source + grep '\[ci skip\]' "$source" >/dev/null 2>&1 + [ $? -eq 0 ] && return + if [ $(git diff --cached --name-only | grep --count "$pattern") -eq 0 ]; then - tempfile=$(mktemp $0.XXXXXX) + tempfile=$(mktemp "${0}.XXXXXX") cat - "$1" <<EOF > "$tempfile" # It seems the changes to be committed are irrelevant for the continuous @@ -19,9 +25,14 @@ function add_ci_skip() # comment or remove the next line. [ci skip] EOF - mv "$tempfile" "$1" + mv "$tempfile" "$source" fi } ## MAIN -add_ci_skip '\(^src\|^test\|^doc/ledger3.texi\|^\.travis.yml\|CMakeLists.txt\)' "$@" +file="$1" +source="$2" + +# Skip merge commits +[ "$source" = "merge" ] && exit 0 +add_ci_skip '\(^src\|^test\|^doc/ledger3.texi\|^\.travis.yml\|CMakeLists.txt\)' "$file" diff --git a/tools/travis-before_install.sh b/tools/travis-before_install.sh index a1800021..fe010945 100755 --- a/tools/travis-before_install.sh +++ b/tools/travis-before_install.sh @@ -9,7 +9,6 @@ if [ "${TRAVIS_OS_NAME}" = "osx" ]; then fi if [ -n "${BOOST_VERSION}" ]; then - echo "Downloading boost ${BOOST_VERSION}" mkdir -p $BOOST_ROOT wget --no-verbose --output-document=- \ http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION//./_}.tar.bz2/download \ diff --git a/tools/travis-install.sh b/tools/travis-install.sh index b5039d5c..4e8bdc48 100755 --- a/tools/travis-install.sh +++ b/tools/travis-install.sh @@ -15,7 +15,6 @@ if [ "${TRAVIS_OS_NAME}" = "osx" ]; then fi if [ -d "${BOOST_ROOT}" ]; then - echo "Installing boost ${BOOST_VERSION} in ${BOOST_ROOT}" (cd "${BOOST_ROOT}" ./bootstrap.sh --with-libraries="${BOOST_LIBS}" ./b2 threading=multi --prefix="${BOOST_ROOT}" -d0 install |