Zway-Bot/Zway-Bot/dpkg/make-deb.sh
2022-01-19 22:59:10 +01:00

44 lines
1.9 KiB
Bash

#!/bin/bash
CSPROJFILE="Zway-Bot.csproj"
VMAJOR=$(grep -e "<Version>" ../$CSPROJFILE | cut -d'>' -f 2 | cut -d'<' -f 1 | cut -d'.' -f 1)
VMINOR=$(grep -e "<Version>" ../$CSPROJFILE | cut -d'>' -f 2 | cut -d'<' -f 1 | cut -d'.' -f 2)
VBUILD=$(grep -e "<Version>" ../$CSPROJFILE | cut -d'>' -f 2 | cut -d'<' -f 1 | cut -d'.' -f 3)
mkdir -p ../deb
mkdir -p ../Builds
export NAME=zwaybot
export MAINAINER="BlubbFish <dev@blubbfish.net>"
export VERSION="$VMAJOR.$VMINOR-$VBUILD"
export DESCRIPTION="Zway-Bot manage a Zwave.me installation so that it has more features"
export DEPENDENCIES="dotnet-runtime-3.1 (>= 3.1.22)"
export EXEPATH=Zway-Bot.dll
export USERNAMEGROUP=zwaybot
export EXEARGUMENTS=" "
export RUNNER=/usr/share/dotnet/dotnet
export COPYEXEC="../bin/Release/netcoreapp3.1/*.dll ../bin/Release/netcoreapp3.1/Zway-Bot.deps.json ../bin/Release/netcoreapp3.1/Zway-Bot.runtimeconfig.json"
export LOGFILE="/var/log/zwaybot/debug.log"
export COPYCONFIG="../bin/Release/netcoreapp3.1/config-example/*.conf"
export CONFIGREPLACEASK="cronjob.conf mqtt.conf names.conf overtaker.conf senml.conf settings.conf statuspolling.conf"
cd ../deb
export PLATFORM=armhf
curl -s https://git.blubbfish.net/vs_utils/CI-Scripts/raw/branch/master/deb/control-build.sh | bash
curl -s https://git.blubbfish.net/vs_utils/CI-Scripts/raw/branch/master/deb/logrotate-build.sh | bash
curl -s https://git.blubbfish.net/vs_utils/CI-Scripts/raw/branch/master/deb/pre-post-build.sh | bash
curl -s https://git.blubbfish.net/vs_utils/CI-Scripts/raw/branch/master/deb/service-build.sh | bash
curl -s https://git.blubbfish.net/vs_utils/CI-Scripts/raw/branch/master/deb/build-deb.sh | bash
export PLATFORM=amd64
curl -s https://git.blubbfish.net/vs_utils/CI-Scripts/raw/branch/master/deb/control-build.sh | bash
curl -s https://git.blubbfish.net/vs_utils/CI-Scripts/raw/branch/master/deb/build-deb.sh | bash
cd ..
rm deb -rf
cp Builds/* ../../Builds/
rm Builds -rf