Create A sync my release file to have CI/CD sinexcel deployement

This commit is contained in:
atef 2026-02-13 09:33:41 +01:00
parent 2cf5ed4b95
commit 95270bb5d1
1 changed files with 21 additions and 0 deletions

View File

@ -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