mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
* Add precommit for secret scanning, formatting and license header checking.
* Turn off bash debug logging.
* Skip precommit checks that apply to all files.
There are too many violations to run against all files.
(cherry picked from commit b00e11cb6f
)
22 lines
464 B
Bash
Executable File
22 lines
464 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set +x
|
|
|
|
if [[ -z ${GITHUB_MODIFIED_FILES} ]]
|
|
then
|
|
modified_files=$(git diff --cached --name-only --diff-filter=ACMR)
|
|
else
|
|
modified_files=${GITHUB_MODIFIED_FILES}
|
|
fi
|
|
|
|
include_list=""
|
|
for file in ${modified_files}
|
|
do
|
|
include_list="${include_list},${file}"
|
|
done
|
|
include_list=${include_list:1}
|
|
|
|
mvn spotless:apply validate -DlicenseUpdateHeaders=true -Pags,all-tas-tests -Dspotless-include-list="${include_list}" > /dev/null || true
|
|
|
|
set -x
|