run_all.sh reproduces every file under analysis/data/ from zero: it clones the in-scope components if missing, exports group issue metadata from git.lab, and regenerates the inventories. Reruns are diff-clean -- no wall-clock time enters an output; 'days since' is measured against the management repo's HEAD date. The management repo is inventoried at main, not at the analysis branch, so this analysis does not observe its own commits. inv_repo.py aborts the run if anything outside analysis/ was modified.
69 lines
1.8 KiB
Bash
Executable File
69 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Reproduce every raw data file of the neckbeard field test from zero.
|
|
#
|
|
# bash analysis/scripts/run_all.sh
|
|
#
|
|
# Clones the in-scope component repos next to the management repo if they
|
|
# are missing, then regenerates everything under analysis/data/.
|
|
# Rerunning on an unchanged tree must produce no diff -- no wall-clock
|
|
# time enters any output (see common.py).
|
|
#
|
|
# Requirements: bash, git, python3 (stdlib only). Network and lab access
|
|
# are needed for the initial clone and for gitlab_issues.json; both steps
|
|
# skip cleanly without them, and everything else still runs.
|
|
|
|
set -euo pipefail
|
|
|
|
MGMT_REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
WORKSPACE="${NB_WORKSPACE:-$(dirname "$MGMT_REPO")}"
|
|
COMPONENTS_DIR="$WORKSPACE/components"
|
|
SCRIPTS="$MGMT_REPO/analysis/scripts"
|
|
|
|
# Scope frozen in analysis/SCOPE.md, confirmed by the human at Phase 0.
|
|
COMPONENTS=(
|
|
threadnet-call
|
|
thread-net-git
|
|
threadnet-operating
|
|
axion1337.chat-gitops
|
|
ThreadNet-Web
|
|
)
|
|
|
|
echo "management repo: $MGMT_REPO"
|
|
echo "workspace: $WORKSPACE"
|
|
|
|
echo
|
|
echo "== components"
|
|
mkdir -p "$COMPONENTS_DIR"
|
|
for slug in "${COMPONENTS[@]}"; do
|
|
target="$COMPONENTS_DIR/$slug"
|
|
if [ -d "$target/.git" ]; then
|
|
echo " $slug: present"
|
|
continue
|
|
fi
|
|
echo " $slug: cloning"
|
|
GIT_TERMINAL_PROMPT=0 git clone -q \
|
|
"https://git.lab/axion1337.chat/$slug.git" "$target"
|
|
# This analysis must never write back. Break the push path on every
|
|
# clone it creates.
|
|
git -C "$target" remote set-url --push origin DISABLED-no-push
|
|
done
|
|
|
|
echo
|
|
echo "== tickets"
|
|
python3 "$SCRIPTS/fetch_gitlab_issues.py"
|
|
|
|
echo
|
|
echo "== repo inventory"
|
|
python3 "$SCRIPTS/inv_repo.py"
|
|
|
|
echo
|
|
echo "== links"
|
|
python3 "$SCRIPTS/inv_links.py"
|
|
|
|
echo
|
|
echo "== claims"
|
|
python3 "$SCRIPTS/inv_claims.py"
|
|
|
|
echo
|
|
echo "done. raw data in $MGMT_REPO/analysis/data/"
|