Create A sync my release file to have CI/CD sinexcel deployement
This commit is contained in:
parent
2cf5ed4b95
commit
95270bb5d1
|
|
@ -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
|
||||
Loading…
Reference in New Issue