repomanci: ignore .git
This commit is contained in:
parent
03b9f22e38
commit
3e1d598443
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
# CI Ebuild commit tester
|
# CI Ebuild commit tester
|
||||||
@ -7,6 +7,18 @@
|
|||||||
# to check the latest commit for QA issues.
|
# to check the latest commit for QA issues.
|
||||||
|
|
||||||
|
|
||||||
|
# skip these directories
|
||||||
|
ignored_dirs="
|
||||||
|
.
|
||||||
|
.git
|
||||||
|
eclass
|
||||||
|
files
|
||||||
|
licenses
|
||||||
|
metadata
|
||||||
|
profiles
|
||||||
|
"
|
||||||
|
|
||||||
|
|
||||||
# Variables needed for tools
|
# Variables needed for tools
|
||||||
[ -z "${ARCH}" ] && export ARCH=x86_64
|
[ -z "${ARCH}" ] && export ARCH=x86_64
|
||||||
[ -z "${ACCEPT_KEYWORDS}" ] && export ACCEPT_KEYWORDS='**'
|
[ -z "${ACCEPT_KEYWORDS}" ] && export ACCEPT_KEYWORDS='**'
|
||||||
@ -23,6 +35,7 @@ repoman -Idix
|
|||||||
|
|
||||||
echo ">>> Starting latest commit test"
|
echo ">>> Starting latest commit test"
|
||||||
|
|
||||||
|
# If any of the QA checks fail the test will fail
|
||||||
test_success=true
|
test_success=true
|
||||||
|
|
||||||
# Iterate through changed files in last commit
|
# Iterate through changed files in last commit
|
||||||
@ -33,28 +46,31 @@ for file in $(git diff --name-only HEAD HEAD~1)
|
|||||||
do
|
do
|
||||||
commit_dir="$(dirname "${file}")"
|
commit_dir="$(dirname "${file}")"
|
||||||
|
|
||||||
# skip these directories
|
for i_dir in ${ignored_dirs}
|
||||||
[[ "${commit_dir}" = *eclass ]] && continue
|
do
|
||||||
[[ "${commit_dir}" = *files ]] && continue
|
if [[ "${commit_dir}" = *"${i_dir}"* ]]
|
||||||
[[ "${commit_dir}" = *licenses* ]] && continue
|
then
|
||||||
[[ "${commit_dir}" = *metadata* ]] && continue
|
echo
|
||||||
[[ "${commit_dir}" = *profiles ]] && continue
|
echo "Ignoring ${commit_dir}"
|
||||||
|
continue 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if cd "${commit_dir}"
|
if cd "${commit_dir}"
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
echo "Directory $(pwd):"
|
echo "Checking ${commit_dir}"
|
||||||
echo "Running repoman -Idix"
|
echo "Running repoman -Idix"
|
||||||
repoman -Idix || test_success=false
|
repoman -Idix || test_success=false
|
||||||
cd - >/dev/null || return
|
cd - >/dev/null || return
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# If any of the QA tools fail the test will fail
|
|
||||||
if [ ${test_success} = false ]
|
if [ ${test_success} = false ]
|
||||||
then
|
then
|
||||||
echo ">>> Exiting with failure due to previous errors..."
|
echo ">>> Exiting with failure due to previous errors"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
echo ">>> Exiting successfully"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user