From 95270bb5d14bc8afeb5bcfd2da57155266161a8d Mon Sep 17 00:00:00 2001 From: atef Date: Fri, 13 Feb 2026 09:33:41 +0100 Subject: [PATCH] Create A sync my release file to have CI/CD sinexcel deployement --- .../SinexcelCommunication/sync-myRelease.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 csharp/App/SinexcelCommunication/sync-myRelease.sh 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