Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: blmayer (bleemayer@gmail.com)
Date: Mon Oct 2 15:14:37 2023 -0300
Parent: e479f26
Fixed quoting
diff --git a/post-receive b/post-receive
index b6b44b6..00e949b 100755
--- a/post-receive
+++ b/post-receive
@@ -2,7 +2,8 @@
# for debugging
# set -ex
-. ./hooks/aux.sh
+. hooks/aux.sh
+# . ./aux.sh
ROOT="$HOME/www/dovel.email"
REPO="$(basename $PWD)"
@@ -23,7 +24,7 @@ updategit() {
<dl>
EOF
- for dir in "$HOME/git/dovel.email"/*
+ for dir in "$HOME/git/dovel.email/"*
do
cat <<- EOF >> "$ROOT/git.html"
<dt><a href=$(basename $dir)/index.html>$(basename $dir)</a></dt>
@@ -247,7 +248,7 @@ git clone . "$OUT/tree"
while read oldrev newrev ref
do
case "$ref" in
- "refs/heads/$BRANCH")
+ "refs/heads/main")
updategit
updateindex
updaterefs
@@ -261,6 +262,6 @@ do
tag="${ref#refs/tags/}"
find "$OUT/tree/" -name go.mod && creategomod "$tag"
;;
- *) echo "Ref $ref received. Doing nothing." ;;
+ *) echo "$ref received. Doing nothing." ;;
esac
done
diff --git a/post-receive-scripts b/post-receive-scripts
index ac6f2c1..8e5c4d5 100755
--- a/post-receive-scripts
+++ b/post-receive-scripts
@@ -21,4 +21,5 @@ cp "$TMP/post-receive-scripts" hooks/post-receive
echo "cleaning up TMP"
rm -fr "$TMP"
+echo "running post-receive-all"
. hooks/post-receive-all