diff --git a/.gitignore b/.gitignore index 29c559f..5e25406 100644 --- a/.gitignore +++ b/.gitignore @@ -221,7 +221,7 @@ ClientBin/ *.publishsettings orleans.codegen.cs -# Including strong name files can present a security risk +# Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk @@ -317,7 +317,7 @@ __pycache__/ # OpenCover UI analysis results OpenCover/ -# Azure Stream Analytics local run output +# Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log @@ -326,5 +326,7 @@ ASALocalRun/ # NVidia Nsight GPU debugger configuration file *.nvuser -# MFractors (Xamarin productivity tool) working folder +# MFractors (Xamarin productivity tool) working folder .mfractor/ + +*.Parm \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index b774641..c0f87c7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,27 +1,21 @@ { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "version": "0.2.0", - "configurations": [ + "version": "0.2.0", + "configurations": [ { "name": ".NET Core Launch (console)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/src/Corsinvest.ProxmoxVE.NodeProtect/bin/Debug/netcoreapp3.1/cv4pve-node-protect.dll", + "program": "${workspaceFolder}/src/Corsinvest.ProxmoxVE.NodeProtect/bin/Debug/net8.0/cv4pve-node-protect.dll", "args": [], "cwd": "${workspaceFolder}/src/Corsinvest.ProxmoxVE.NodeProtect", - // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console "console": "internalConsole", "stopAtEntry": false }, { "name": ".NET Core Attach", "type": "coreclr", - "request": "attach", - "processId": "${command:pickProcess}" + "request": "attach" } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 78b37ac..7697b4c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,9 +7,9 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/src/Corsinvest.ProxmoxVE.NodeProtect/Corsinvest.ProxmoxVE.NodeProtect.csproj", + "${workspaceFolder}/Corsinvest.ProxmoxVE.NodeProtect.sln", "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" + "/consoleloggerparameters:NoSummary;ForceNoAlign" ], "problemMatcher": "$msCompile" }, @@ -19,9 +19,9 @@ "type": "process", "args": [ "publish", - "${workspaceFolder}/src/Corsinvest.ProxmoxVE.NodeProtect/Corsinvest.ProxmoxVE.NodeProtect.csproj", + "${workspaceFolder}/Corsinvest.ProxmoxVE.NodeProtect.sln", "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" + "/consoleloggerparameters:NoSummary;ForceNoAlign" ], "problemMatcher": "$msCompile" }, @@ -32,9 +32,8 @@ "args": [ "watch", "run", - "${workspaceFolder}/src/Corsinvest.ProxmoxVE.NodeProtect/Corsinvest.ProxmoxVE.NodeProtect.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" + "--project", + "${workspaceFolder}/Corsinvest.ProxmoxVE.NodeProtect.sln" ], "problemMatcher": "$msCompile" } diff --git a/README.MD b/README.MD index 29115af..075a3a1 100644 --- a/README.MD +++ b/README.MD @@ -3,33 +3,28 @@ [![License](https://img.shields.io/github/license/Corsinvest/cv4pve-node-protect.svg)](LICENSE.md) ```text - ______ _ __ - / ____/___ __________(_)___ _ _____ _____/ /_ - / / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/ - / /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_ - \____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/ + ______ _ __ + / ____/___ __________(_)___ _ _____ _____/ /_ + / / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/ + / /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_ + \____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/ -Node protect for Proxmox VE (Made in Italy) + cv4pve-node-protect is a part of suite cv4pve. + For more information visit https://www.corsinvest.it/cv4pve -Usage: cv4pve-node-protect [options] +Usage: + cv4pve-node-protect [command] [options] Options: - -?|-h|--help Show help information - --version Show version information - --host The host name host[:port],host1[:port],host2[:port] - --username User name - --password The password + --username User name + --password The Password + --host (REQUIRED) The host name host[:port],host1[:port],host2[:port] + --version Show version information + -?, -h, --help Show help and usage information Commands: - app-check-update Check update application - app-upgrade Upgrade application - backup Backup configuration form nodes using ssh - upload Upload configuration tar.gz to node - -Run 'cv4pve-node-protect [command] --help' for more information about a command. - -cv4pve-node-protect is a part of suite cv4pve-tools. -For more information visit https://www.cv4pve-tools.com + backup Backup configuration form nodes using ssh + upload Upload configuration tar.gz to node ``` ## Copyright and License @@ -39,7 +34,7 @@ For licensing details please visit [LICENSE.md](LICENSE.md) ## Commercial Support -This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the [site](https://www.cv4pve-tools.com) +This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the [site](https://www.corsinvest.it/cv4pve) ## Introduction diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index dc34bcd..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 1.0.{build} -image: Visual Studio 2019 -build_script: -- cmd: >- - dotnet --version - - dotnet restore - - dotnet build -c Release - - dotnet pack -c Release \ No newline at end of file diff --git a/src/Corsinvest.ProxmoxVE.NodeProtect.Api/Corsinvest.ProxmoxVE.NodeProtect.Api.csproj b/src/Corsinvest.ProxmoxVE.NodeProtect.Api/Corsinvest.ProxmoxVE.NodeProtect.Api.csproj index 80bad63..ad97ad3 100644 --- a/src/Corsinvest.ProxmoxVE.NodeProtect.Api/Corsinvest.ProxmoxVE.NodeProtect.Api.csproj +++ b/src/Corsinvest.ProxmoxVE.NodeProtect.Api/Corsinvest.ProxmoxVE.NodeProtect.Api.csproj @@ -1,9 +1,8 @@  - net6.0 - true + net8.0 - 1.5.0 + 1.6.0 Corsinvest Srl Daniele Corsini Corsinvest Srl @@ -13,13 +12,20 @@ https://github.com/Corsinvest/cv4pve-node-protect ProxmoxVE;Api,Client;Rest;Corsinvest;Node;Protect - icon.png - - LICENSE.md + https://github.com/Corsinvest/cv4pve-node-protect + + GPL-3.0-only + ..\..\..\.nupkgs\ + README.md icon.png true Github - https://github.com/Corsinvest/cv4pve-node-protect + + true + true + + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb true snupkg @@ -33,8 +39,8 @@ - + - + \ No newline at end of file diff --git a/src/Corsinvest.ProxmoxVE.NodeProtect/Corsinvest.ProxmoxVE.NodeProtect.csproj b/src/Corsinvest.ProxmoxVE.NodeProtect/Corsinvest.ProxmoxVE.NodeProtect.csproj index fbcd15d..e79f43c 100644 --- a/src/Corsinvest.ProxmoxVE.NodeProtect/Corsinvest.ProxmoxVE.NodeProtect.csproj +++ b/src/Corsinvest.ProxmoxVE.NodeProtect/Corsinvest.ProxmoxVE.NodeProtect.csproj @@ -1,8 +1,8 @@  Exe - 1.2.1 - net6.0 + 1.4.0 + net8.0 cv4pve-node-protect Corsinvest Srl Daniele Corsini @@ -16,9 +16,9 @@ - + - - + + diff --git a/src/Corsinvest.ProxmoxVE.NodeProtect/Program.cs b/src/Corsinvest.ProxmoxVE.NodeProtect/Program.cs index cea6f38..e123c15 100644 --- a/src/Corsinvest.ProxmoxVE.NodeProtect/Program.cs +++ b/src/Corsinvest.ProxmoxVE.NodeProtect/Program.cs @@ -3,17 +3,9 @@ * SPDX-FileCopyrightText: 2019 Copyright Corsinvest Srl */ -using System.Threading.Tasks; using Corsinvest.ProxmoxVE.Api.Shell.Helpers; +using Corsinvest.ProxmoxVE.NodeProtect; -namespace Corsinvest.ProxmoxVE.NodeProtect; - -class Program -{ - static async Task Main(string[] args) - { - var app = ConsoleHelper.CreateApp("cv4pve-node-protect", "Node protect for Proxmox VE"); - _ = new Commands(app); - return await app.ExecuteApp(args); - } -} \ No newline at end of file +var app = ConsoleHelper.CreateApp("cv4pve-node-protect", "Node protect for Proxmox VE"); +_ = new Commands(app); +return await app.ExecuteApp(args); diff --git a/src/Corsinvest.ProxmoxVE.NodeProtect/build.ps1 b/src/Corsinvest.ProxmoxVE.NodeProtect/build.ps1 index 43f48e9..4dfb489 100644 --- a/src/Corsinvest.ProxmoxVE.NodeProtect/build.ps1 +++ b/src/Corsinvest.ProxmoxVE.NodeProtect/build.ps1 @@ -16,17 +16,22 @@ Write-Output " == Build System =========================================================" -$pathNet = "Bin\Release\net6.0" +$pathNet = "Bin\Release\net8.0" Remove-Item -Path ".\$pathNet" -Recurse -Force -$rids = @("linux-x64", "linux-arm", "linux-arm64", "osx-x64", "win-x86", "win-x64", "win-arm", "win-arm64") +$rids = @("linux-x64", "linux-arm", "linux-arm64", "osx-x64","osx-arm64", "win-x86", "win-x64", "win-arm64") foreach ($rid in $rids) { dotnet publish -r $rid -c Release /p:PublishSingleFile=true --self-contained #/p:EnableCompressionInSingleFile=true $path = "$pathNet\$rid\publish\" - $fileName = Get-ChildItem $path -Exclude *.pdb -name + $fileName = Get-ChildItem $path -Exclude *.pdb, *.xml -name $fileDest = "$pathNet\$fileName-$rid.zip" Remove-Item $fileDest -ErrorAction SilentlyContinue Compress-Archive $path\$fileName $fileDest -} \ No newline at end of file + + Remove-Item "$pathNet\$rid" -Recurse -Force +} + +Remove-Item "bin\debug" -Recurse -Force +Remove-Item "obj" -Recurse -Force \ No newline at end of file