#!/usr/bin/env bash
set -euxo pipefail
dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:PublishTrimmed=false -p:DebuggerSupport=false -c Release -r linux-arm64
ssh zotan@172.23.42.125 sudo systemctl stop afrapay-web
scp -r ./bin/Release/net7.0/linux-arm64/publish afrapay@172.23.42.125:/opt/afrapay
ssh zotan@172.23.42.125 sudo systemctl restart afrapay-web
