fix(jd): install sharing hook through Forgejo
This commit is contained in:
parent
8298d3482b
commit
c7c17f8fd4
2 changed files with 6 additions and 3 deletions
|
|
@ -4,7 +4,10 @@ set -eu
|
|||
# The code-channel service runs with UMask=0077. Keep that isolation for its
|
||||
# database and other state, but make Git objects and refs readable/writable by
|
||||
# the repository's dedicated shared group after an accepted public push.
|
||||
repo_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd -P)
|
||||
cat >/dev/null
|
||||
repo_dir=$(git rev-parse --absolute-git-dir)
|
||||
expected_repo=/var/lib/guanghu/personas/guanghu/hlcc-v16.0.1/data/repositories/bingshuo/guanghu-ice-heart.git
|
||||
[ "$repo_dir" = "$expected_repo" ] || exit 0
|
||||
cd "$repo_dir"
|
||||
owner_uid=$(id -u)
|
||||
|
||||
|
|
@ -30,4 +33,4 @@ for shared_file in HEAD packed-refs; do
|
|||
fi
|
||||
done
|
||||
|
||||
printf '%s\n' "post_receive_permissions_reconciled" >"$repo_dir/hooks/post-receive.last"
|
||||
printf '%s\n' "post_receive_permissions_reconciled" >"$repo_dir/hooks/post-receive-share.last"
|
||||
|
|
|
|||
Loading…
Reference in a new issue