#!/bin/sh
# Script to run when testing core-plans on Travis CI
set -x

# debug info
echo "TRAVIS_COMMIT=$TRAVIS_COMMIT"
echo "TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE"

PARENT_COMMIT=$(git log --pretty=%P -n 1 "$TRAVIS_COMMIT")
echo "PARENT_COMMIT=$PARENT_COMMIT"
## end debug

pre-commit install

# Retrieve the canonical range.
# The TRAVIS_COMMIT env var is always a merge commit, so we want to test from
# the original commit all the way up until HEAD.
ORIGIN=$(echo "$TRAVIS_COMMIT_RANGE" | cut -f1 -d'.')

pre-commit run --origin "$ORIGIN" --source HEAD

#!/bin/sh
# Script to run when testing core-plans on Travis CI
set -x

# debug info
echo "TRAVIS_COMMIT=$TRAVIS_COMMIT"
echo "TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE"
echo "HEAD=$(git rev-parse HEAD)"

PARENT_COMMIT=$(git log --pretty=%P -n 1 "$TRAVIS_COMMIT")
echo "PARENT_COMMIT=$PARENT_COMMIT"
## end debug

pre-commit install

# Retrieve the canonical range.
# The TRAVIS_COMMIT env var is always a merge commit, so we want to test from
# the original commit all the way up until HEAD.
ORIGIN=$(echo "$TRAVIS_COMMIT_RANGE" | cut -f1 -d'.')
SOURCE=$(echo "$TRAVIS_COMMIT_RANGE" | cut -f4 -d'.')

pre-commit run --origin "$ORIGIN" --source "$SOURCE"

Fix Travis on auto branch
Fix Travis on auto branch

When homu runs its test on the aut branch, use the values given in the
commit range to make sure it passes.

Signed-off-by: Nathan L Smith <2b5c240e6abd88e71ffc225b0459016e4cba9bda@chef.io>
