#!/bin/bash dotnet_version='net6.0' salimax_ip="$1" is_release="$2" # Pass --release if this is a real release username='inesco' root_password='Sodistore0918425' release_flag_file="./bin/Release/$dotnet_version/linux-arm64/publish/.release.flag" set -e echo -e "\n============================ Build ============================\n" dotnet publish \ ./GrowattCommunication.csproj \ -p:PublishTrimmed=false \ -c Release \ -r linux-arm64 echo -e "\n============================ Deploy ============================\n" rsync -v \ --exclude '*.pdb' \ ./bin/Release/$dotnet_version/linux-arm64/publish/* \ $username@"$salimax_ip":~/SodiStoreHome if [[ "$is_release" == "--release" ]]; then echo -e "\n✅ Real release. Triggering sync to server..." touch "$release_flag_file" else echo -e "\n🚫 Test build. Not syncing to main release server." fi