Files
APT-Package/run-build.sh
KoCoder fee56ed714
Some checks failed
build-debian-package / Build the debian package (push) Failing after 4m7s
Fix: appsettings.json getting overwritten on upgrade
2026-01-30 13:21:36 +01:00

33 lines
1013 B
Bash
Executable File

#!/bin/bash
VERSION="$1"
DEBIAN_PACKAGE_PATH="$2"
echo "Building oqtane.framework"
dotnet restore ./oqtane.framework/Oqtane.slnx
dotnet build ./oqtane.framework/Oqtane.slnx --no-restore
dotnet build -c Release ./oqtane.framework/Oqtane.slnx --no-restore
dotnet publish -c Release ./oqtane.framework/Oqtane.Server/Oqtane.Server.csproj -o ./alumnihub/opt/alumnihub --no-restore
mkdir -p ./oqtane.framework/Oqtane.Server/Packages
echo ""
echo "Building Modules and Themes"
for module in $(ls . | grep -E 'Module|Theme')
do
echo "######## Building $module"
dotnet restore ./$module/*.slnx
dotnet build -c Release ./$module/*.slnx --no-restore
dotnet publish -c Release ./$module/*.slnx --no-restore
done
cp -r ./oqtane.framework/Oqtane.Server/Packages ./alumnihub/opt/alumnihub/Packages
rm ./alumnihub/opt/alumnihub/appsettings.json
echo $VERSION $DEBIAN_PACKAGE_PATH
echo "Version: ${VERSION}" >> $DEBIAN_PACKAGE_PATH/DEBIAN/control
dpkg-deb --root-owner-group --build $DEBIAN_PACKAGE_PATH