Compare commits

..

1 次程式碼提交

作者 SHA1 備註 提交日期
2cd5c52013 POST-Deploying multiple jekyll sites at once 2018-12-06 01:08:03 -05:00

查看文件

@@ -1,19 +1,17 @@
#!/usr/bin/env bash #!/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 "/var/lib/git/gogs/gogs" hook --config='/var/lib/git/gogs/conf/app.ini' post-receive
GIT_REPO="$(pwd)" GIT_DIR="$(pwd)"
TMP_GIT_CLONE="/tmp/${GIT_REPO##*/}" TMP_GIT_DIR="/tmp/${GIT_DIR##*/}"
if [ ! -d "${TMP_GIT_CLONE}" ]; then if [ ! -d "${TMP_GIT_DIR}" ]; then
git clone "${GIT_REPO}" "${TMP_GIT_CLONE}" git clone "${GIT_DIR}" "${TMP_GIT_DIR}"
cd "${TMP_GIT_CLONE}" cd "${TMP_GIT_DIR}"
else else
cd "${TMP_GIT_CLONE}" cd "${TMP_GIT_DIR}"
unset GIT_DIR
git fetch --all git fetch --all
git reset --hard origin/master git reset --hard origin/master
git pull git pull
fi fi
@@ -25,4 +23,5 @@ for site in *.*/; do
popd popd
done done
exit 0
exit