Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: blmayer (bleemayer@gmail.com)
Date: Tue Oct 3 13:49:41 2023 -0300
Parent: c6670c7
Fixed tmp dir
commit bcda3d268f6e9ee111b99f1b8e2925a0c4bf4436
Author: blmayer <bleemayer@gmail.com>
Date: Tue Oct 3 13:49:41 2023 -0300
Fixed tmp dir
diff --git a/post-receive b/post-receive
index 9ff3d8b..00f9815 100755
--- a/post-receive
+++ b/post-receive
@@ -237,11 +237,15 @@ updatetree() {
# first argument should be the version, e.g. v0.1.0
creategomod() {
+ TMP="$(mktemp -d)"
+ git --work-tree="$TMP" checkout -f main
+
[ -d "$OUT/@latest" ] || mkdir -p "$OUT/@latest"
[ -d "$OUT/@v/$1" ] || mkdir -p "$OUT/@v/$1"
- find "$OUT/tree/"* -print | sed "s:$OUT/tree/:dovel.email/$REPO@v$1/" | zip -@ > "$OUT/@v/$1.zip"
+ find "$TMP/"* -print | sed "s:$TMP/:dovel.email/$REPO@v$1:" | zip -@ > "$OUT/@v/$1.zip"
cp "$OUT/$1.zip" "$OUT/@latest/"
+ rm -rf "$TMP"
}
[ -d "$OUT/tree" ] && rm -rf "$OUT/tree"
commit bcda3d268f6e9ee111b99f1b8e2925a0c4bf4436
Author: blmayer <bleemayer@gmail.com>
Date: Tue Oct 3 13:49:41 2023 -0300
Fixed tmp dir
diff --git a/post-receive-scripts b/post-receive-scripts
index 184c3c4..582b3ba 100755
--- a/post-receive-scripts
+++ b/post-receive-scripts
@@ -5,7 +5,7 @@
echo "copying scritps"
TMP="$(mktemp -d)"
-git --work-tree="$TMP" checkout -f ${BRANCH}
+git --work-tree="$TMP" checkout -f main
# copy main scripts to projects
for dir in ../*