add binary build workflow and hook policy

This commit is contained in:
Jabberwocky238
2026-07-30 01:07:37 -04:00
parent 319f5dd148
commit 0588c85b8f
6 changed files with 93 additions and 127 deletions
+14 -3
View File
@@ -1,5 +1,16 @@
#!/bin/sh
# Default simplegit hook policy. Deployments can replace it with -hook-script.
# $1 is the Git hook type, $2 is the owner/name repository, remaining arguments
# are the original Git hook arguments. Original stdin and GIT_* env are intact.
# Default standalone policy: append the hook invocation and its stdin to a log.
# Integrations can supply another script with simplegit daemon -hook-script.
log_file=${SIMPLEGIT_HOOK_LOG:-${SIMPLEGIT_REPO_ROOT%/repos}/hooks.log}
{
printf '%s\t%s\t%s' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$1" "$2"
shift 2
for arg in "$@"; do
printf '\t%s' "$arg"
done
printf '\n'
sed 's/^/stdin\t/'
} >>"$log_file" 2>/dev/null || true
exit 0