Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: brian (git@myr.sh)
Date: Sun Oct 1 18:04:49 2023 -0300
Parent: a3d4edc
Fixed tags for go mod
diff --git a/post-receive b/post-receive
index 76e1c5f..58046d6 100755
--- a/post-receive
+++ b/post-receive
@@ -29,9 +29,12 @@ do
# update repo's log page
. ./hooks/update-repo-log
;;
- "refs/tags/"*)
+ "refs/tags/v"*)
+ echo "received version tag $ref"
+
# check repo for go mod
- find -name go.mod tree/ && .hooks/create-go-mod "$tag"
+ tag="${ref#refs/tags/}"
+ find tree/ -name go.mod && .hooks/create-go-mod "$tag"
;;
*) echo "Ref $ref received. Doing nothing." ;;
esac
diff --git a/post-receive-scripts b/post-receive-scripts
index cff619d..cf44b5f 100755
--- a/post-receive-scripts
+++ b/post-receive-scripts
@@ -45,8 +45,9 @@ do
. ./hooks/update-repo-tree
. ./hooks/update-repo-log
;;
- "refs/tags/"*)
+ "refs/tags/v"*)
# check repo for go mod
+ tag="${ref#refs/tags/}"
find -name go.mod tree/ && .hooks/create-go-mod "$tag"
;;
*) echo "Ref $ref received. Doing nothing." ;;