diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 832a7d97..2b332099 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,18 @@ jobs: uses: actions/setup-dotnet@v1.7.2 with: dotnet-version: ${{ matrix.dotnet-version }} - - name: Install dependencies - run: dotnet restore MQTTnet.sln + - name: Build - run: dotnet build --configuration Release --no-restore MQTTnet.sln - - name: Test MQTTnet - run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.Core.Tests\MQTTnet.Tests.csproj - - name: Test AspNetCore - run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.AspNetCore.Tests\MQTTnet.AspNetCore.Tests.csproj \ No newline at end of file + shell: pwsh + run: | + .\Build\build.ps1 1.2.3 4.5.6-rc1 + + +# - name: Install dependencies +# run: dotnet restore MQTTnet.sln +# - name: Build +# run: dotnet build --configuration Release --no-restore MQTTnet.sln +# - name: Test MQTTnet +# run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.Core.Tests\MQTTnet.Tests.csproj +# - name: Test AspNetCore +# run: dotnet test --no-restore --verbosity normal Tests\MQTTnet.AspNetCore.Tests\MQTTnet.AspNetCore.Tests.csproj \ No newline at end of file diff --git a/Build/deb-meta/DEBIAN/control b/Build/deb-meta/DEBIAN/control deleted file mode 100644 index 242444c7..00000000 --- a/Build/deb-meta/DEBIAN/control +++ /dev/null @@ -1,10 +0,0 @@ -Package: mqttnet-server -Version: VERSIONPLACEHOLDER -Section: base -Priority: optional -Architecture: amd64 -Depends: libssl1.1 -Suggests: -Maintainer: Damian Wolgast -Description: - MQTTnet Server is a standalone cross platform MQTT server (like mosquitto) basing on this library. diff --git a/Build/deb-meta/DEBIAN/copyright b/Build/deb-meta/DEBIAN/copyright deleted file mode 100644 index decf080f..00000000 --- a/Build/deb-meta/DEBIAN/copyright +++ /dev/null @@ -1,26 +0,0 @@ -The source of MQTTnet is at: -https://github.com/chkr1011/MQTTnet -Project is maintained by Christian Kratky - - -MIT License - -Copyright (c) 2021 Damian Wolgast - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/Build/deb-meta/DEBIAN/postinst b/Build/deb-meta/DEBIAN/postinst deleted file mode 100644 index 9a90e944..00000000 --- a/Build/deb-meta/DEBIAN/postinst +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# Check if user exits -USER=mqttnetsrv -USEREXISTS=$(id -u $USER >/dev/null 2>&1; echo $?) -EC=0 -BASEPATH=/opt -INSTALLPATH=$BASEPATH/MQTTnetServer - -# If user does not exist, create it -if (( $USEREXISTS == 1 )); then - useradd -d $INSTALLPATH -r $USER - EC=$(echo $?) - - if (( $EC == 1 )); then - exit 1; - fi -fi - -# Set permissions on files -chown -R root:root $INSTALLPATH - -# Check if config does not exist and create it -if [ ! -f "$INSTALLPATH/appsettings.json" ]; then - cp $INSTALLPATH/appsettings.template.json $INSTALLPATH/appsettings.json -fi - - -# Check if setcap exists, does not exist in docker containers -SCAP=$(which setcap >/dev/null; echo $?) -if [ "$SCAP" -eq "0" ]; then - # Enable MQTTServer.NET to bind to IP interface - setcap CAP_NET_BIND_SERVICE=+eip $INSTALLPATH/MQTTnet.Server -fi - -chmod 644 /etc/systemd/system/mqttnet-server.service - -# Check if systemctl exists, does not exist in docker containers -SCTL=$(which systemctl >/dev/null; echo $?) - -if [ "$SCTL" -eq "0" ]; then - # Reload systemd because of new service file - systemctl daemon-reload -fi \ No newline at end of file diff --git a/Build/deb-meta/DEBIAN/postrm b/Build/deb-meta/DEBIAN/postrm deleted file mode 100644 index 9db22d48..00000000 --- a/Build/deb-meta/DEBIAN/postrm +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Check if systemctl exists, does not exist in docker containers -SCTL=$(which systemctl >/dev/null; echo $?) -if [ "$SCTL" -eq "0" ]; then - # Reload systemd because of new service file - systemctl daemon-reload -fi \ No newline at end of file diff --git a/Build/deb-meta/DEBIAN/prerm b/Build/deb-meta/DEBIAN/prerm deleted file mode 100644 index ae23bcac..00000000 --- a/Build/deb-meta/DEBIAN/prerm +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -BASEPATH=/opt -INSTALLPATH=$BASEPATH/MQTTnetServer - -# Check if systemctl exists, does not exist in docker containers -SCTL=$(which systemctl >/dev/null; echo $?) -if [ "$SCTL" -eq "0" ]; then - # Stop service before uninstalling - systemctl stop mqttnet-server -fi - -# Check if setcap exists, does not exist in docker containers -SCAP=$(which setcap >/dev/null; echo $?) -if [ "$SCAP" -eq "0" ]; then - # Remove permission to open ports - setcap CAP_NET_BIND_SERVICE=-eip $INSTALLPATH/MQTTnet.Server -fi \ No newline at end of file diff --git a/Build/deb-meta/etc/systemd/system/mqttnet-server.service b/Build/deb-meta/etc/systemd/system/mqttnet-server.service deleted file mode 100644 index 41816247..00000000 --- a/Build/deb-meta/etc/systemd/system/mqttnet-server.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=MQTTnetServer -After=network.target - -[Service] -ExecStart=/opt/MQTTnetServer/MQTTnet.Server -WorkingDirectory=/opt/MQTTnetServer -StandardOutput=inherit -StandardError=inherit -Restart=always -User=mqttnetsrv - -[Install] -WantedBy=multi-user.target \ No newline at end of file