Files
Mateusz Gruszczyński bc5fbd6ba9
RustBox CI / rustbox (push) Waiting to run
first commit
2026-10-29 15:24:59 +01:00

43 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
REMOTE="upstream-oxi"
TARGET="${1:-upstream-oxi/main}"
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
echo "error: not a Git checkout" >&2
exit 1
fi
if ! git remote get-url "$REMOTE" >/dev/null 2>&1; then
echo "error: Oxi remote is not configured; run ./scripts/setup-upstream.sh" >&2
exit 1
fi
git fetch "$REMOTE" --tags >/dev/null
BASE="$(tr -d '[:space:]' < UPSTREAM_BASE)"
TARGET_SHA="$(git rev-parse "$TARGET^{commit}")"
if ! git merge-base --is-ancestor "$BASE" "$TARGET_SHA"; then
echo "error: recorded Oxi base is not an ancestor of $TARGET ($TARGET_SHA)" >&2
exit 1
fi
printf 'RustBox Oxi status\n'
printf ' consumed: %s\n' "$BASE"
printf ' target: %s\n' "$TARGET_SHA"
printf ' commits: %s\n' "$(git rev-list --count "$BASE..$TARGET_SHA")"
printf '\nOxi backend changes that can be mapped into RustBox root:\n'
git diff --name-status "$BASE..$TARGET_SHA" -- backend/ || true
printf '\nOxi frontend changes requiring manual RustBox UI port:\n'
git diff --name-status "$BASE..$TARGET_SHA" -- frontend/ || true
printf '\nOther Oxi repository changes to review manually:\n'
git diff --name-status "$BASE..$TARGET_SHA" -- . ':(exclude)backend/**' ':(exclude)frontend/**' || true
printf '\nUpstream commits:\n'
git log --oneline --decorate --no-merges "$BASE..$TARGET_SHA" || true