AkurAI Build
Menu

Public repository / 6bb03beff5ca893c4caf66f9aa5fa00769e53cd3

AkurAI-Monitor / scripts/sync-framework-version.sh

Latest change 811ef9b7c8ba017fa242f008efa90faab07a0454 - Adopt AkurAI-Framework UI layer and add framework-version tracking by Ólafur Búi Ólafsson

#!/usr/bin/env bash
# Sync FRAMEWORK_VERSION from the AkurAI-Framework checkout.
# Run from the AkurAI-Monitor repo root.
set -euo pipefail

FRAMEWORK_V="$HOME/Projects/AkurAI-Framework/VERSION"
DEST="FRAMEWORK_VERSION"

if [ ! -f "$FRAMEWORK_V" ]; then
    echo "error: $FRAMEWORK_V not found — is the Framework checkout present?" >&2
    exit 1
fi

SRC_VER=$(tr -d '[:space:]' < "$FRAMEWORK_V")
DST_VER=""
if [ -f "$DEST" ]; then
    DST_VER=$(tr -d '[:space:]' < "$DEST")
fi

if [ "$SRC_VER" = "$DST_VER" ]; then
    echo "FRAMEWORK_VERSION is already $SRC_VER — no change needed."
    exit 0
fi

if [ -n "$DST_VER" ]; then
    echo "Updating FRAMEWORK_VERSION: $DST_VER -> $SRC_VER"
else
    echo "Creating FRAMEWORK_VERSION: $SRC_VER"
fi

cp "$FRAMEWORK_V" "$DEST"
echo "Done."