New: run-build.sh now also for Development Environments
This commit is contained in:
@@ -20,7 +20,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dotnet-version: "10.0.x"
|
dotnet-version: "10.0.x"
|
||||||
- name: "Build .deb"
|
- name: "Build .deb"
|
||||||
run: ./run-build.sh "${{ gitea.ref_name }}" "./alumnihub"
|
run: ./run-build.sh "${{ gitea.ref_name }}" "./alumnihub" "Release"
|
||||||
- name: "Upload .deb"
|
- name: "Upload .deb"
|
||||||
run: curl --user kocoder:${{ secrets.REGISTRY_TOKEN_KOCODER }} --upload-file ./alumnihub.deb https://git.kocoder.xyz/api/packages/Diplomarbeit-Absolventenverein/debian/pool/trixie/main/upload
|
run: curl --user kocoder:${{ secrets.REGISTRY_TOKEN_KOCODER }} --upload-file ./alumnihub.deb https://git.kocoder.xyz/api/packages/Diplomarbeit-Absolventenverein/debian/pool/trixie/main/upload
|
||||||
- name: "Create release"
|
- name: "Create release"
|
||||||
|
|||||||
19
run-build.sh
19
run-build.sh
@@ -1,13 +1,23 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
DEBIAN_PACKAGE_PATH="$2"
|
DEBIAN_PACKAGE_PATH="$2"
|
||||||
|
ENVIRONMENT="$3"
|
||||||
|
|
||||||
|
if [ "$#" -ne 3 ]; then
|
||||||
|
echo "Error: You must provide exactly three arguments."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$VERSION" "$DEBIAN_PACKAGE_PATH" "$ENVIRONMENT"
|
||||||
|
|
||||||
echo "Building oqtane.framework"
|
echo "Building oqtane.framework"
|
||||||
|
|
||||||
dotnet restore ./oqtane.framework/Oqtane.slnx
|
dotnet restore ./oqtane.framework/Oqtane.slnx
|
||||||
dotnet build ./oqtane.framework/Oqtane.slnx --no-restore
|
dotnet build ./oqtane.framework/Oqtane.slnx --no-restore
|
||||||
dotnet build -c Release ./oqtane.framework/Oqtane.slnx --no-restore
|
dotnet build -c "$ENVIRONMENT" ./oqtane.framework/Oqtane.slnx --no-restore
|
||||||
dotnet publish -c Release ./oqtane.framework/Oqtane.Server/Oqtane.Server.csproj -o ./alumnihub/opt/alumnihub --no-restore
|
dotnet publish -c "$ENVIRONMENT" ./oqtane.framework/Oqtane.Server/Oqtane.Server.csproj -o ./alumnihub/opt/alumnihub --no-restore
|
||||||
|
|
||||||
|
dotnet build -c "$ENVIRONMENT" ./interfaces/SZUAbsolventenverein.slnx --no-restore
|
||||||
|
|
||||||
mkdir -p ./oqtane.framework/Oqtane.Server/Packages
|
mkdir -p ./oqtane.framework/Oqtane.Server/Packages
|
||||||
|
|
||||||
@@ -18,15 +28,14 @@ for module in $(ls . | grep -E 'Module|Theme')
|
|||||||
do
|
do
|
||||||
echo "######## Building $module"
|
echo "######## Building $module"
|
||||||
dotnet restore ./$module/*.slnx
|
dotnet restore ./$module/*.slnx
|
||||||
dotnet build -c Release ./$module/*.slnx --no-restore
|
dotnet build -c "$ENVIRONMENT" ./$module/*.slnx --no-restore
|
||||||
dotnet publish -c Release ./$module/*.slnx --no-restore
|
dotnet publish -c "$ENVIRONMENT" ./$module/*.slnx --no-restore
|
||||||
done
|
done
|
||||||
|
|
||||||
cp -r ./oqtane.framework/Oqtane.Server/Packages ./alumnihub/opt/alumnihub/Packages
|
cp -r ./oqtane.framework/Oqtane.Server/Packages ./alumnihub/opt/alumnihub/Packages
|
||||||
|
|
||||||
rm ./alumnihub/opt/alumnihub/appsettings.json
|
rm ./alumnihub/opt/alumnihub/appsettings.json
|
||||||
|
|
||||||
echo $VERSION $DEBIAN_PACKAGE_PATH
|
|
||||||
|
|
||||||
echo "Version: ${VERSION}" >> $DEBIAN_PACKAGE_PATH/DEBIAN/control
|
echo "Version: ${VERSION}" >> $DEBIAN_PACKAGE_PATH/DEBIAN/control
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user