Files
RollCalcPython/scripts/update_build_info.sh
T
2026-07-27 11:11:32 +02:00

17 lines
339 B
Bash
Executable File

#!/bin/bash
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
VERSION="${1:-v0.4-dev}"
cd "$PROJECT_ROOT"
cat > build_info.json <<EOF
{
"version": "$VERSION",
"branch": "$(git branch --show-current)",
"commit": "$(git rev-parse --short HEAD)",
"timestamp": "$(date -Iseconds)"
}
EOF