Commit initial: récupération et tri rapide
This commit is contained in:
commit
a52829f96c
104 changed files with 11892 additions and 0 deletions
11
hooks-git/website-cracra/post-receive
Executable file
11
hooks-git/website-cracra/post-receive
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Stop on the first error
|
||||
set -ex
|
||||
|
||||
export GIT_WORK_TREE=$GIT_DIR/..
|
||||
|
||||
# Theoretically, everything has been checked in the pre-receive hook
|
||||
# and no local modification should go missing (at worst, there's the
|
||||
# reflog)
|
||||
git reset --hard
|
14
hooks-git/website-cracra/pre-receive
Executable file
14
hooks-git/website-cracra/pre-receive
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Stop on the first error
|
||||
set -ex
|
||||
|
||||
export GIT_WORK_TREE=$GIT_DIR/..
|
||||
|
||||
# Check for diff between the index and the staging area
|
||||
git diff-index --quiet --cached HEAD --
|
||||
# Check for diff between the working tree and the staging area
|
||||
git diff-files --quiet
|
||||
|
||||
# No abandoned files
|
||||
test -z "$( cd "$GIT_WORK_TREE" && GIT_WORK_TREE="$PWD" GIT_DIR="$GIT_WORK_TREE/.git" git --git-dir=.git ls-files --others )"
|
11
hooks-git/website-cracra/readme.txt
Normal file
11
hooks-git/website-cracra/readme.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
fr : Ces hooks permettent de mettre à jour un site web statique
|
||||
directement via git push.
|
||||
Il faut autoriser le "in place" dans le dépôt Git distant :
|
||||
[receive]
|
||||
denyCurrentBranch = ignore
|
||||
|
||||
en : Those hooks allow to update a static website directly with
|
||||
a git push.
|
||||
You need to allow 'in place' in the remote git repository :
|
||||
[receive]
|
||||
denyCurrentBranch = ignore
|
Loading…
Add table
Add a link
Reference in a new issue