diff options
author | EuAndreh <eu@euandre.org> | 2023-03-11 08:53:30 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-11 19:36:12 -0300 |
commit | 786d6958a5733b28ec089685df7c0eac980c5f2a (patch) | |
tree | 9afb19eda6db66f68f5a914aa4fa38fde8b0d9b5 /src/infrastructure/ci/git-pre-receive.sh | |
parent | channels.scm: Remove "nonguix" channel (diff) | |
download | server-786d6958a5733b28ec089685df7c0eac980c5f2a.tar.gz server-786d6958a5733b28ec089685df7c0eac980c5f2a.tar.xz |
Copy files back
Diffstat (limited to 'src/infrastructure/ci/git-pre-receive.sh')
-rwxr-xr-x | src/infrastructure/ci/git-pre-receive.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/infrastructure/ci/git-pre-receive.sh b/src/infrastructure/ci/git-pre-receive.sh new file mode 100755 index 0000000..8cd83ee --- /dev/null +++ b/src/infrastructure/ci/git-pre-receive.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -eu + +read -r _oldrev SHA _refname +unset GIT_DIR + +if [ "$SHA" = '0000000000000000000000000000000000000000' ]; then + exit +fi + +printf 'Upgrading post-receive hook...' >&2 +git show "$SHA":src/infrastructure/ci/git-post-receive.sh > hooks/post-receive +chmod +x hooks/post-receive +printf 'done.\n' >&2 |