Comparar comentimentos
1 Cometimentos
2cd5c52013
...
386766e3f6
| Autor(a) | SHA1 | Data | |
|---|---|---|---|
| 386766e3f6 |
@@ -1,17 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# post-receive hook to build and deploy jekyll sites
|
||||
"/var/lib/git/gogs/gogs" hook --config='/var/lib/git/gogs/conf/app.ini' post-receive
|
||||
|
||||
GIT_DIR="$(pwd)"
|
||||
TMP_GIT_DIR="/tmp/${GIT_DIR##*/}"
|
||||
GIT_REPO="$(pwd)"
|
||||
TMP_GIT_CLONE="/tmp/${GIT_REPO##*/}"
|
||||
|
||||
if [ ! -d "${TMP_GIT_DIR}" ]; then
|
||||
git clone "${GIT_DIR}" "${TMP_GIT_DIR}"
|
||||
cd "${TMP_GIT_DIR}"
|
||||
if [ ! -d "${TMP_GIT_CLONE}" ]; then
|
||||
git clone "${GIT_REPO}" "${TMP_GIT_CLONE}"
|
||||
cd "${TMP_GIT_CLONE}"
|
||||
else
|
||||
cd "${TMP_GIT_DIR}"
|
||||
unset GIT_DIR
|
||||
cd "${TMP_GIT_CLONE}"
|
||||
|
||||
git fetch --all
|
||||
git reset --hard origin/master
|
||||
|
||||
git pull
|
||||
fi
|
||||
|
||||
@@ -23,5 +25,4 @@ for site in *.*/; do
|
||||
popd
|
||||
done
|
||||
|
||||
|
||||
exit
|
||||
exit 0
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador