From d5362790b8f8f9995d7ae6fde9f1191fd87e3464 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Tue, 2 Jun 2020 23:32:08 -0700 Subject: [PATCH 1/2] Fix a logic error in the build script loader Also pull upstream changes in NUKE's loader and update the SDK version --- DotnetCliVersion.txt | 2 +- build.ps1 | 20 +++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/DotnetCliVersion.txt b/DotnetCliVersion.txt index 61bb1836..4ba19403 100644 --- a/DotnetCliVersion.txt +++ b/DotnetCliVersion.txt @@ -1 +1 @@ -3.1.200 \ No newline at end of file +3.1.300 \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index 5cc0b61e..02af2662 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,7 +1,5 @@ [CmdletBinding()] Param( - #[switch]$CustomParam, - [switch]$BuildDotnetCoreOnly, [Parameter(Position = 0, Mandatory = $false, ValueFromRemainingArguments = $true)] [string[]]$BuildArguments ) @@ -16,10 +14,10 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent ########################################################################### $BuildProjectFile = "$PSScriptRoot\build\_build.csproj" -$TempDirectory = "$PSScriptRoot\\.tmp" +$TempDirectory = "$PSScriptRoot\.tmp" -$DotNetGlobalFile = "$PSScriptRoot\\global.json" -$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" +$DotNetGlobalFile = "$PSScriptRoot\global.json" +$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1" $DotNetChannel = "Current" $DotNetCliVersion = Get-Content DotnetCliVersion.txt @@ -53,12 +51,13 @@ try { (!(Test-Path variable:DotNetVersion) -or $(& cmd.exe /c 'dotnet --version 2>&1') -eq $DotNetVersion)) { $env:DOTNET_EXE = (Get-Command "dotnet").Path } - elseif ($null -eq (Get-Command $env:DOTNET_EXE -ErrorAction SilentlyContinue) -and ` - (!(Test-Path variable:DotNetVersion) -or $(& cmd.exe /c '$env:DOTNET_EXE --version 2>&1') -ne $DotNetVersion)) { + elseif ($null -eq (Get-Command $env:DOTNET_EXE -ErrorAction SilentlyContinue) -or ` + !(Test-Path variable:DotNetVersion) -or $(& cmd.exe /c "$env:DOTNET_EXE --version 2>&1") -ne $DotNetVersion) { # Download install script $DotNetInstallFile = "$TempDirectory\dotnet-install.ps1" - mkdir -force $TempDirectory > $null + New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 (New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) # Install by channel or version @@ -72,11 +71,6 @@ try { Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)" - if($BuildDotnetCoreOnly) { - $BuildArguments += "-DoCoreBuildOnly" - $BuildArguments += "true" - } - ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile -- $BuildArguments } } catch { From 3de2a4b90b2dff787170a4f908cf69d8f6b99002 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Thu, 4 Jun 2020 11:17:30 -0700 Subject: [PATCH 2/2] Update MyGet package publishing --- build/Build.cs | 6 +----- src/LibHac/LibHac.csproj | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index d7603261..bc348136 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -291,17 +291,13 @@ namespace LibHacBuild .Executes(() => { AbsolutePath nupkgFile = ArtifactsDirectory.GlobFiles("*.nupkg").Single(); - AbsolutePath snupkgFile = ArtifactsDirectory.GlobFiles("*.snupkg").Single(); string apiKey = EnvironmentInfo.GetVariable("myget_api_key"); DotNetNuGetPushSettings settings = new DotNetNuGetPushSettings() .SetApiKey(apiKey) - .SetSymbolApiKey(apiKey) - .SetSource("https://www.myget.org/F/libhac/api/v2/package") - .SetSymbolSource("https://www.myget.org/F/libhac/symbols/api/v2/package"); + .SetSource("https://www.myget.org/F/libhac/api/v3/index.json"); DotNetNuGetPush(settings.SetTargetPath(nupkgFile)); - DotNetNuGetPush(settings.SetTargetPath(snupkgFile)); }); Target Sign => _ => _ diff --git a/src/LibHac/LibHac.csproj b/src/LibHac/LibHac.csproj index a1fa1d61..f6d2d87c 100644 --- a/src/LibHac/LibHac.csproj +++ b/src/LibHac/LibHac.csproj @@ -10,7 +10,7 @@ Alex Barney - Copyright © 2018 Alex Barney + Copyright © 2018-2020 Alex Barney A library for reading content formats used by the Nintendo Switch. Nintendo;Switch;nca;xci;savefile https://github.com/Thealexbarney/LibHac @@ -19,6 +19,7 @@ true snupkg true + true true