49 lines
1.3 KiB
Bash
Executable file
49 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
# release.sh — copy source repo to ifc-commit-release, filtering dev-only files.
|
|
# Usage: bash scripts/release.sh [/path/to/ifc-commit-release]
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
SRC="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
DEST="${1:-$SRC/../ifc-commit-release}"
|
|
|
|
if [[ ! -d "$DEST" ]]; then
|
|
echo "Destination not found: $DEST"
|
|
echo "Cloning ifc-commit-release via nx..."
|
|
(cd "$(dirname "$DEST")" && nx git clone forge ifc-commit-release)
|
|
if [[ ! -d "$DEST" ]]; then
|
|
echo "Error: clone failed, $DEST still not found."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
echo "Source : $SRC"
|
|
echo "Dest : $DEST"
|
|
echo
|
|
|
|
# Sync files, excluding dev-only and build artefacts
|
|
rsync -av --delete \
|
|
--exclude='.git' \
|
|
--exclude='CLAUDE.md' \
|
|
--exclude='AGENT.md' \
|
|
--exclude='AGENT_RELEASE.md' \
|
|
--exclude='__pycache__/' \
|
|
--exclude='*.pyc' \
|
|
--exclude='*.pyo' \
|
|
--exclude='.venv/' \
|
|
--exclude='dist/' \
|
|
--exclude='demo/' \
|
|
--exclude='ifc/' \
|
|
--exclude='*.ifc' \
|
|
--exclude='index.html' \
|
|
--exclude='research.html' \
|
|
"$SRC/" "$DEST/"
|
|
|
|
# Copy AGENT_RELEASE.md as AGENT.md in the release repo
|
|
echo
|
|
echo "Installing AGENT_RELEASE.md → AGENT.md"
|
|
cp "$SRC/AGENT_RELEASE.md" "$DEST/AGENT.md"
|
|
|
|
echo
|
|
echo "Done. Review changes in $DEST before committing and pushing."
|