From 8d919d4cc4d277d06d24a9c8dd6157fe9bcf1aa1 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 25 Sep 2026 10:37:05 +0200 Subject: Move maintainer tooling out of the repo Git hooks, the upstream sweep and the SBo delivery workflow are the maintainer's operational tools, not package knowledge. They now live in a private workspace that wraps all three SlackBuild repos, with one shared copy of each hook instead of three drifting ones. Also in this pass: - AGENTS.md: checksum loop documented as sbodl (sbofixinfo does not fix checksums), nvchecker must not run without a token config, prefer use_latest_release over use_max_tag - README: Git Hooks section replaced by a short Contributing note - sweep report renamed to LAST_SWEEP.md across all three repos Co-Authored-By: Claude Opus 5.5 --- .extras/hooks/post-commit | 70 ----------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100755 .extras/hooks/post-commit (limited to '.extras/hooks/post-commit') diff --git a/.extras/hooks/post-commit b/.extras/hooks/post-commit deleted file mode 100755 index 6f55d61..0000000 --- a/.extras/hooks/post-commit +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -# post-commit hook: create SBo submission archive for added/updated packages -set -u - -REPO_ROOT=$(git rev-parse --show-toplevel) -SBO_DIR="$REPO_ROOT/SBo" - -# Find packages whose .SlackBuild was added (A) or modified (M) in this commit. -# git diff-tree output format: \t -# Paths are //.SlackBuild, matching SBo's own -# layout. Depth isn't asserted: any dir holding a .SlackBuild is a build. -PACKAGES=() -while IFS=$'\t' read -r status file; do - [[ "$status" != "A" && "$status" != "M" ]] && continue - dir=$(dirname "$file") - base=$(basename "$file") - [[ "$dir" == "." ]] && continue # skip root-level files - [[ "$base" == *.SlackBuild ]] || continue - PACKAGES+=("$dir") -done < <(git diff-tree --no-commit-id -r --name-status HEAD) - -[[ ${#PACKAGES[@]} -eq 0 ]] && exit 0 - -for pkg in "${PACKAGES[@]}"; do - echo "" - echo "==> Package: $pkg" - echo "" - echo "Files to be archived:" - echo "---------------------" - while IFS= read -r f; do - printf '%s\n' "${f#"$REPO_ROOT/"}" - done < <(find "$REPO_ROOT/$pkg" -type f | sort) - echo "" - # Non-interactive override: set SBO_ARCHIVE=yes|no to skip the prompt. - # Lets agents and scripts answer without a terminal. - case "${SBO_ARCHIVE:-}" in - [yY]|[yY][eE][sS]) answer=yes ;; - [nN]|[nN][oO]) echo " -> Skipped (SBO_ARCHIVE=no)."; continue ;; - "") - # No override: need an interactive terminal to prompt. - if [ ! -r /dev/tty ]; then - echo " -> No terminal, skipped (set SBO_ARCHIVE=yes to archive)." - continue - fi - printf "Create SBo archive for '%s'? [y/N] " "$pkg" - answer="" - read -r answer Skipped (SBO_ARCHIVE='$SBO_ARCHIVE' unrecognized)."; continue ;; - esac - case "$answer" in - [yY]|[yY][eE][sS]) - mkdir -p "$SBO_DIR" - # $pkg is /. SBo expects a tarball named after - # the package, with the package dir (not the category) at its - # root, so name it by basename and tar from inside the category. - name=$(basename "$pkg") - if tar -czf "$SBO_DIR/$name.tar.gz" -C "$REPO_ROOT/$(dirname "$pkg")" "$name"; then - echo " -> Archive created: SBo/$name.tar.gz" - else - echo " -> Archive FAILED." >&2 - fi - ;; - *) - echo " -> Skipped." - ;; - esac -done - -exit 0 -- cgit v1.2.3