tesses-cms/package.sh

60 lines
4.3 KiB
Bash
Raw Permalink Normal View History

2024-08-10 18:32:16 +00:00
#!/bin/bash
2024-08-10 18:40:36 +00:00
export PATH=/root/.dotnet/tools:$PATH
2024-08-10 18:32:16 +00:00
dotnet tool install --global dotnet-deb
. /deploy_dir/setpath.sh
ln -s "$DEPLOY_DIR" publish
cd Tesses.CMS.Server
dotnet deb -c Release -o out
cd out
for f in *.deb; do mv -- "$f" "${f%.deb}_all.deb";done
cp *.deb /pool/
cd ../
mkdir ../publish/server/linux-{x64,arm,arm64}
dotnet publish -c Release -o ../publish/server/linux-x64 -r linux-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/server/linux-arm -r linux-arm --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/server/linux-arm64 -r linux-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
mkdir ../publish/server/win-{x86,x64,arm64}
dotnet publish -c Release -o ../publish/server/win-x86 -r win-x86 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/server/win-x64 -r win-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/server/win-arm64 -r win-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
mkdir ../publish/server/osx-{x64,arm64}
dotnet publish -c Release -o ../publish/server/osx-x64 -r osx-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/server/osx-arm64 -r osx-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
cd ../Tesses.CMS.Cli
dotnet deb -c Release -o out
cd out
for f in *.deb; do mv -- "$f" "${f%.deb}_all.deb";done
cp *.deb /pool/
cd ../
mkdir ../publish/cli/linux-{x64,arm,arm64}
dotnet publish -c Release -o ../publish/cli/linux-x64 -r linux-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/cli/linux-arm -r linux-arm --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/cli/linux-arm64 -r linux-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
mkdir ../publish/cli/win-{x86,x64,arm64}
dotnet publish -c Release -o ../publish/cli/win-x86 -r win-x86 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/cli/win-x64 -r win-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/cli/win-arm64 -r win-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
mkdir ../publish/cli/osx-{x64,arm64}
dotnet publish -c Release -o ../publish/cli/osx-x64 -r osx-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../publish/cli/osx-arm64 -r osx-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
cd ../Tesses.CMS.Avalonia/Tesses.CMS.Avalonia.Desktop
dotnet deb -c Release -o out
cd out
for f in *.deb; do mv -- "$f" "${f%.deb}_all.deb";done
cp *.deb /pool/
cd ../
mkdir ../../publish/desktop/linux-{x64,arm,arm64}
dotnet publish -c Release -o ../../publish/desktop/linux-x64 -r linux-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../../publish/desktop/linux-arm -r linux-arm --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../../publish/desktop/linux-arm64 -r linux-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
#mkdir ../../publish/desktop/win-{x86,x64,arm64}
#dotnet publish -c Release -o ../../publish/desktop/win-x86 -r win-x86 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
#dotnet publish -c Release -o ../../publish/desktop/win-x64 -r win-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
#dotnet publish -c Release -o ../../publish/desktop/win-arm64 -r win-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
mkdir ../../publish/desktop/osx-{x64,arm64}
dotnet publish -c Release -o ../../publish/desktop/osx-x64 -r osx-x64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
dotnet publish -c Release -o ../../publish/desktop/osx-arm64 -r osx-arm64 --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
cd ../Tesses.CMS.Avalonia.Android
mkdir ../../publish/android
dotnet publish -c Release -o ../../publish/android