#!/bin/bash VERSION="$1" DEBIAN_PACKAGE_PATH="$2" dotnet restore ./oqtane.framework/Oqtane.slnx dotnet build -c Release ./oqtane.framework/Oqtane.slnx dotnet publish -c Release ./oqtane.framework/Oqtane.Server/Oqtane.Server.csproj for module in $(ls . | grep -E 'Module|Theme') do dotnet restore ./$module/*.slnx dotnet build -c Release ./$module/*.slnx dotnet publish -c Release ./$module/*.slnx done echo $VERSION $DEBIAN_PACKAGE_PATH echo "Version: ${VERSION}" >> $DEBIAN_PACKAGE_PATH/DEBIAN/control dpkg-deb --root-owner-group --build $DEBIAN_PACKAGE_PATH