Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: blmayer (bleemayer@gmail.com)
Date: Fri Oct 6 17:59:00 2023 -0300
Parent: 19b6c03
Improved zip
diff --git a/post-receive b/post-receive index b7cf6cd..43417c0 100755 --- a/post-receive +++ b/post-receive @@ -255,13 +255,16 @@ initmail() { # first argument should be the version, e.g. v0.1.0 creategomod() { + # create page with meta tag + echo "<meta name=\"go-import\" content=\"dovel.email/server mod https://dovel.email\">" > "$OUT?go-get=1" + TMP="$(mktemp -d)" mkdir -p "$TMP/dovel.email/$REPO@$1" git --work-tree="$TMP/dovel.email/$REPO@$1/" checkout -f main PREFIX="${OUT%/*}/dovel.email/$REPO" [ -d "$PREFIX/@v" ] || mkdir -p "$PREFIX/@v" - (cd "$TMP" && zip "$PREFIX/@v/$1.zip" -r * ) + (cd "$TMP" && find * -type f -print | zip -@ "$PREFIX/@v/$1.zip") echo "{\"Version\":\"$1\"}" > "$PREFIX/@v/$1.info" rm -rf "$TMP"