Dixon/utils/deploy_dixon
Russell Gilbert 3a4e00a409 Adds basic logging and refactors main loop
Adds a basic logging system using std::clog with color codes for different log levels.
Refactors the main loop to use the logging system and improve readability.
Changes DixonNodeState to use atomic exchange for setting node status and logs status changes.
Removes the old main.cpp and adds a new one that uses a separate thread for signal handling.
Updates the CMakeLists.txt to link against gpiod and spdlog.
Moves version information into a version.txt file and creates a custom target to bump the version using a python script.
2026-02-20 15:27:42 +00:00

22 lines
658 B
Bash
Executable file

#!/bin/bash
# Configuration
LOCAL_BIN="$HOME/dev/Dixon/src/RobotNode/cmake-build-pi5-debug/dixon"
REMOTE_TARGET="russellg59@dixon1"
REMOTE_DIR="/home/russellg59/dixon"
REMOTE_EXE="$REMOTE_DIR/dixon"
# Check if the monster PC actually finished the build
if [ ! -f "$LOCAL_BIN" ]; then
echo "Error: Binary not found at $LOCAL_BIN"
exit 1
fi
echo "Cleaning remote path and pushing binary..."
# Remove the target first to prevent the 'directory' bug, then push and fix permissions
ssh $REMOTE_TARGET "rm -rf $REMOTE_EXE"
scp "$LOCAL_BIN" $REMOTE_TARGET:"$REMOTE_EXE"
ssh $REMOTE_TARGET "chmod +x $REMOTE_EXE"
echo "Deployment complete: $REMOTE_EXE"