From 9876121e06eee7cdb42e486fd7150aa4eb61a0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Sat, 28 Dec 2019 20:38:06 +0100 Subject: [PATCH] Removed nuke --- .nuke | 1 - PInvokeSerialPort.sln | 12 -------- build.ps1 | 68 ------------------------------------------- build.sh | 62 --------------------------------------- build/.editorconfig | 10 ------- build/Build.cs | 61 -------------------------------------- build/_build.csproj | 38 ------------------------ 7 files changed, 252 deletions(-) delete mode 100644 .nuke delete mode 100644 build.ps1 delete mode 100644 build.sh delete mode 100644 build/.editorconfig delete mode 100644 build/Build.cs delete mode 100644 build/_build.csproj diff --git a/.nuke b/.nuke deleted file mode 100644 index 7f2cb81..0000000 --- a/.nuke +++ /dev/null @@ -1 +0,0 @@ -PInvokeSerialPort.sln \ No newline at end of file diff --git a/PInvokeSerialPort.sln b/PInvokeSerialPort.sln index 6870271..1768411 100755 --- a/PInvokeSerialPort.sln +++ b/PInvokeSerialPort.sln @@ -17,8 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeSerialPort.Test", "P EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeSerialPort.Sample", "PInvokeSerialPort.Sample\PInvokeSerialPort.Sample.csproj", "{76FAB402-7515-4A9B-8605-4FEC0736C78A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{74EBF183-3069-4E47-865A-8EB76FBCD0C6}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,16 +59,6 @@ Global {76FAB402-7515-4A9B-8605-4FEC0736C78A}.Release|Mixed Platforms.Build.0 = Release|x86 {76FAB402-7515-4A9B-8605-4FEC0736C78A}.Release|x86.ActiveCfg = Release|x86 {76FAB402-7515-4A9B-8605-4FEC0736C78A}.Release|x86.Build.0 = Release|x86 - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Debug|x86.ActiveCfg = Debug|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Debug|x86.Build.0 = Debug|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Release|x86.ActiveCfg = Release|Any CPU - {74EBF183-3069-4E47-865A-8EB76FBCD0C6}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 5fa4ce5..0000000 --- a/build.ps1 +++ /dev/null @@ -1,68 +0,0 @@ -[CmdletBinding()] -Param( - [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] - [string[]]$BuildArguments -) - -Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)" - -Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { exit 1 } -$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent - -########################################################################### -# CONFIGURATION -########################################################################### - -$BuildProjectFile = "$PSScriptRoot\build\_build.csproj" -$TempDirectory = "$PSScriptRoot\\.tmp" - -$DotNetGlobalFile = "$PSScriptRoot\\global.json" -$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" -$DotNetChannel = "Current" - -$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 -$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 - -########################################################################### -# EXECUTION -########################################################################### - -function ExecSafe([scriptblock] $cmd) { - & $cmd - if ($LASTEXITCODE) { exit $LASTEXITCODE } -} - -# If global.json exists, load expected version -if (Test-Path $DotNetGlobalFile) { - $DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json) - if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) { - $DotNetVersion = $DotNetGlobal.sdk.version - } -} - -# If dotnet is installed locally, and expected version is not set or installation matches the expected version -if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and ` - (!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) { - $env:DOTNET_EXE = (Get-Command "dotnet").Path -} -else { - $DotNetDirectory = "$TempDirectory\dotnet-win" - $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" - - # Download install script - $DotNetInstallFile = "$TempDirectory\dotnet-install.ps1" - New-Item -ItemType Directory -Path $TempDirectory | Out-Null - (New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) - - # Install by channel or version - if (!(Test-Path variable:DotNetVersion)) { - ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath } - } else { - ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } - } -} - -Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)" - -ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false } -ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments } diff --git a/build.sh b/build.sh deleted file mode 100644 index e3c1121..0000000 --- a/build.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash - -echo $(bash --version 2>&1 | head -n 1) - -set -eo pipefail -SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) - -########################################################################### -# CONFIGURATION -########################################################################### - -BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj" -TEMP_DIRECTORY="$SCRIPT_DIR//.tmp" - -DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" -DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" -DOTNET_CHANNEL="Current" - -export DOTNET_CLI_TELEMETRY_OPTOUT=1 -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - -########################################################################### -# EXECUTION -########################################################################### - -function FirstJsonValue { - perl -nle 'print $1 if m{"'$1'": "([^"]+)",?}' <<< ${@:2} -} - -# If global.json exists, load expected version -if [ -f "$DOTNET_GLOBAL_FILE" ]; then - DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE")) - if [ "$DOTNET_VERSION" == "" ]; then - unset DOTNET_VERSION - fi -fi - -# If dotnet is installed locally, and expected version is not set or installation matches the expected version -if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version 2>&1) == "$DOTNET_VERSION") ]]; then - export DOTNET_EXE="$(command -v dotnet)" -else - DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" - export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" - - # Download install script - DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" - mkdir -p "$TEMP_DIRECTORY" - curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" - chmod +x "$DOTNET_INSTALL_FILE" - - # Install by channel or version - if [ -z ${DOTNET_VERSION+x} ]; then - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path - else - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path - fi -fi - -echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" - -"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false -"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@" diff --git a/build/.editorconfig b/build/.editorconfig deleted file mode 100644 index 94be682..0000000 --- a/build/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -[*.cs] -dotnet_style_qualification_for_field = false:warning -dotnet_style_qualification_for_property = false:warning -dotnet_style_qualification_for_method = false:warning -dotnet_style_qualification_for_event = false:warning -dotnet_style_require_accessibility_modifiers = never:warning - -csharp_style_expression_bodied_properties = true:warning -csharp_style_expression_bodied_indexers = true:warning -csharp_style_expression_bodied_accessors = true:warning diff --git a/build/Build.cs b/build/Build.cs deleted file mode 100644 index 3502735..0000000 --- a/build/Build.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Linq; -using Nuke.Common; -using Nuke.Common.CI.AppVeyor; -using Nuke.Common.Execution; -using Nuke.Common.Git; -using Nuke.Common.ProjectModel; -using Nuke.Common.Tooling; -using Nuke.Common.Tools.DotNet; -using Nuke.Common.Utilities.Collections; -using static Nuke.Common.EnvironmentInfo; -using static Nuke.Common.IO.FileSystemTasks; -using static Nuke.Common.IO.PathConstruction; -using static Nuke.Common.Tools.DotNet.DotNetTasks; - -[CheckBuildProjectConfigurations] -[UnsetVisualStudioEnvironmentVariables] -class Build : NukeBuild -{ - /// Support plugins are available for: - /// - JetBrains ReSharper https://nuke.build/resharper - /// - JetBrains Rider https://nuke.build/rider - /// - Microsoft VisualStudio https://nuke.build/visualstudio - /// - Microsoft VSCode https://nuke.build/vscode - - public static int Main () => Execute(x => x.Compile); - - [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] - readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; - - [Solution] readonly Solution Solution; - [GitRepository] readonly GitRepository GitRepository; - - Target Clean => _ => _ - .Before(Restore) - .Executes(() => - { - }); - - Target Restore => _ => _ - .Executes(() => - { - DotNetRestore(_ => _ - .SetProjectFile(Solution)); - }); - - Target Compile => _ => _ - .DependsOn(Restore) - .Executes(() => - { - DotNetBuild(_ => _ - .SetProjectFile(Solution) - .SetConfiguration(Configuration) - .EnableNoRestore() - .SetAssemblyVersion(AppVeyor.Instance.BuildVersion) - .SetFileVersion(AppVeyor.Instance.BuildVersion) - .SetVersionSuffix(AppVeyor.Instance.BuildVersion) - .SetVersion(AppVeyor.Instance.BuildVersion)); - }); - -} diff --git a/build/_build.csproj b/build/_build.csproj deleted file mode 100644 index 39d690e..0000000 --- a/build/_build.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - Exe - netcoreapp3.0 - false - - False - CS0649;CS0169 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -