diff --git a/csharp/App/SinexcelCommunication/sync-myRelease.sh b/csharp/App/SinexcelCommunication/sync-myRelease.sh new file mode 100755 index 000000000..dc4f1fc3a --- /dev/null +++ b/csharp/App/SinexcelCommunication/sync-myRelease.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +WATCHDIR="$HOME/sync/work/Code/CSharp/git_trunk/csharp/App/SinexcelCommunication/bin/Release/net6.0/linux-arm64/publish" +DEST="ubuntu@91.92.155.224:/home/ubuntu/SinexcelReleases" + +echo "👀 Watching for real releases in $WATCHDIR..." + +inotifywait -m -e close_write --format '%w%f' "$WATCHDIR" | while read file; do + filename="$(basename "$file")" + + if [[ "$filename" == ".release.flag" ]]; then + echo "🚀 Release flag detected. Syncing full release to $DEST..." + + rm "$file" + rsync -avz \ + --exclude '*.pdb' \ + "$WATCHDIR/" "$DEST/" + + echo "✅ Sync completed and flag cleared." + fi +done