diff options
author | Parabola git <git@parabola.nu> | 2020-03-14 04:00:02 +0000 |
---|---|---|
committer | Parabola git <git@parabola.nu> | 2020-03-14 04:00:02 +0000 |
commit | befad61daab3012252e1baae0cd180e4312e5008 (patch) | |
tree | 0de7c4bab64ab0f5a951bcc4b8ccd60954927b2d | |
parent | 977aded7fe47aeb3cb83b1e15d123fa0fbe2c701 (diff) |
Update from cron
l--------- | abslibre/blacklist.git/hooks/.#pre-receive | 1 | ||||
-rwxr-xr-x | abslibre/blacklist.git/hooks/pre-receive | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/abslibre/blacklist.git/hooks/.#pre-receive b/abslibre/blacklist.git/hooks/.#pre-receive deleted file mode 120000 index de68fb9..0000000 --- a/abslibre/blacklist.git/hooks/.#pre-receive +++ /dev/null @@ -1 +0,0 @@ -root@winston.parabola.nu.2349507
\ No newline at end of file diff --git a/abslibre/blacklist.git/hooks/pre-receive b/abslibre/blacklist.git/hooks/pre-receive index 356f24e..c0a2625 100755 --- a/abslibre/blacklist.git/hooks/pre-receive +++ b/abslibre/blacklist.git/hooks/pre-receive @@ -12,7 +12,7 @@ readonly LOG_BLACKLIST_GIT_HOOK=1 readonly CLONE_DIR=/home/autobuilder/packages/blacklist-validate-git-hook readonly LOG_DIR=/var/log/blacklist-validate-git-hook readonly SHA_REGEX='^([0-9a-f]{40})$' -readonly VALIDATION_SCRIPT=check.sh +readonly VALIDATION_SCRIPT=report readonly PERMS_ERR_MSG="could not create checkout directory: ${CLONE_DIR}" readonly CHECKOUT_ERR_MSG="working tree does not appear to be the blacklist.git repo" readonly FAIL_MSG="validation failed for ref: %s - did you run ${VALIDATION_SCRIPT}?" @@ -74,16 +74,16 @@ LogParseRefData "${ref_data}" ${prev_sha} ${curr_sha} ${ref_file} ${repo} ${ref} # git clone --no-hardlinks $(pwd) ${tmp_dir} # cd ${tmp_dir} + echo "validating ref: ${ref}" ( GIT_WORK_TREE=${CLONE_DIR}/ GIT_DIR=${CLONE_DIR}/.git git fetch local-git-home git checkout ${curr_sha} . ) - ! [[ -f ${CLONE_DIR}/blacklist.txt ]] && \ ! [[ -x ${CLONE_DIR}/${VALIDATION_SCRIPT} ]] && echo "${CHECKOUT_ERR_MSG}" && return 1 - ! ./check.sh && echo "${FAIL_MSG}${ref}" && return 1 + ! ./${VALIDATION_SCRIPT} && printf "${FAIL_MSG}\n" "${ref}" && return 1 #echo "prev_sha=$prev_sha curr_sha=$curr_sha" #ls |