30 lines
1004 B
Bash
30 lines
1004 B
Bash
#!/usr/bin/env bash
|
|
# tools/build_spore.sh
|
|
# Package a "Spore" bundle: minimal bootstrap seed + furnishing scripts + metadata
|
|
|
|
set -euo pipefail
|
|
|
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
outdir="${repo_root}/dist"
|
|
mkdir -p "${outdir}"
|
|
|
|
timestamp="$(date -u +%Y%m%dT%H%M%SZ)"
|
|
spore_name="railiance_spore_${timestamp}.tar.gz"
|
|
spore_path="${outdir}/${spore_name}"
|
|
|
|
echo "[*] Building spore bundle → ${spore_path}"
|
|
|
|
# Metadata file
|
|
cat > "${outdir}/SPORE_METADATA.txt" <<META
|
|
Railiance Spore
|
|
---------------
|
|
Timestamp: ${timestamp}
|
|
Repo: $(basename "${repo_root}")
|
|
Commit: $(git -C "${repo_root}" rev-parse HEAD 2>/dev/null || echo "N/A")
|
|
META
|
|
|
|
# Bundle essential files
|
|
tar -czf "${spore_path}" -C "${repo_root}" tools/create_railiance_repo.sh tools/furnish_railiance_repo.sh tools/build_spore.sh tools/seed_node.sh LICENSE README.md .editorconfig .gitattributes .gitignore docs/ -C "${outdir}" SPORE_METADATA.txt
|
|
|
|
echo "[✓] Spore bundle created: ${spore_path}"
|