Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to net 6.0.101 release #2635

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.100-preview.3.21202.5'
dotnet-version: '6.0.101'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.100-preview.3.21202.5'
dotnet-version: '6.0.101'
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk" : {
"version": "6.0.100-preview.3.21202.5"
"version": "6.0.101"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk" : {
"version": "6.0.101"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let tests =
(sprintf "stdout should contain '%s', but was: '%s'" expectedNetStandardPathPortion stdOut)
|> Expect.isTrue (stdOut.Contains expectedNetStandardPathPortion)

testCase "Runner run script with 6.0.100-preview.3.21202.5 SDK version assemblies" <| fun _ ->
testCase "Runner run script with 6.0.100 SDK version assemblies" <| fun _ ->
try
use d = createTestDir()
let installerDir = Path.Combine(d.Dir, "Temp Dir")
Expand All @@ -45,30 +45,30 @@ let tests =
{ option.InstallerOptions o with
CustomDownloadDir = Some installerDir }
ForceInstall = true
WorkingDirectory = scenarioTempPath "core-reference-assemblies-net60-preview"
WorkingDirectory = scenarioTempPath "core-reference-assemblies-net60100"
CustomInstallDir = Some preparedDir
Channel = DotNet.CliChannel.Version 6 0
Version = DotNet.CliVersion.Version "6.0.100-preview.3.21202.5" })
Version = DotNet.CliVersion.Version "6.0.100" })
|> ignore

Environment.setEnvironVar "FAKE_SDK_RESOLVER_CUSTOM_DOTNET_PATH" preparedDir

let result =
handleAndFormat <| fun _ ->
fakeRunAndCheck Ctx.Verbose "reference-assemblies.fsx" "reference-assemblies.fsx" "core-reference-assemblies-net60-preview"
fakeRunAndCheck Ctx.Verbose "reference-assemblies.fsx" "reference-assemblies.fsx" "core-reference-assemblies-net60100"

let stdOut =
String.Join("\n", result.Messages).Trim()

let expectedNet6PathPortion = "packs"</>"Microsoft.NETCore.App.Ref"</>"6.0.0-preview.3.21201.4"</>"ref"</>"net6.0"
let expectedNet6PathPortion = "packs"</>"Microsoft.NETCore.App.Ref"</>"6.0.0"</>"ref"</>"net6.0"

(sprintf "stdout should contain path like '%s', but was: '%s'" expectedNet6PathPortion stdOut)
|> Expect.isTrue (stdOut.Contains expectedNet6PathPortion)
finally
// clean up after the test run
Environment.setEnvironVar "FAKE_SDK_RESOLVER_CUSTOM_DOTNET_PATH" ""

testCase "Runner run script with 6.0.100 SDK version assemblies" <| fun _ ->
testCase "Runner run script with 6.0.101 SDK version assemblies" <| fun _ ->
try
use d = createTestDir()
let installerDir = Path.Combine(d.Dir, "Temp Dir")
Expand All @@ -82,22 +82,22 @@ let tests =
{ option.InstallerOptions o with
CustomDownloadDir = Some installerDir }
ForceInstall = true
WorkingDirectory = scenarioTempPath "core-reference-assemblies-net60"
WorkingDirectory = scenarioTempPath "core-reference-assemblies-net60101"
CustomInstallDir = Some preparedDir
Channel = DotNet.CliChannel.Version 6 0
Version = DotNet.CliVersion.Version "6.0.100" })
Version = DotNet.CliVersion.Version "6.0.101" })
|> ignore

Environment.setEnvironVar "FAKE_SDK_RESOLVER_CUSTOM_DOTNET_PATH" preparedDir

let result =
handleAndFormat <| fun _ ->
fakeRunAndCheck Ctx.Verbose "reference-assemblies.fsx" "reference-assemblies.fsx" "core-reference-assemblies-net60"
fakeRunAndCheck Ctx.Verbose "reference-assemblies.fsx" "reference-assemblies.fsx" "core-reference-assemblies-net60101"

let stdOut =
String.Join("\n", result.Messages).Trim()

let expectedNet6PathPortion = "packs"</>"Microsoft.NETCore.App.Ref"</>"6.0.0"</>"ref"</>"net6.0"
let expectedNet6PathPortion = "packs"</>"Microsoft.NETCore.App.Ref"</>"6.0.1"</>"ref"</>"net6.0"

(sprintf "stdout should contain path like '%s', but was: '%s'" expectedNet6PathPortion stdOut)
|> Expect.isTrue (stdOut.Contains expectedNet6PathPortion)
Expand Down
2 changes: 1 addition & 1 deletion src/test/Fake.Core.UnitTests/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let main argv =
let writeResults = TestResults.writeNUnitSummary ("Fake_Core_UnitTests.TestResults.xml", "Fake.Core.UnitTests")
let config =
defaultConfig
|> ExpectoHelpers.addTimeout (TimeSpan.FromMinutes(20.))
|> ExpectoHelpers.addTimeout (TimeSpan.FromMinutes(30.))
|> ExpectoHelpers.setFakePrinter
|> ExpectoHelpers.appendSummaryHandler writeResults
Expecto.Tests.runTestsInAssembly config argv
10 changes: 9 additions & 1 deletion src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

open Expecto
open System
open System.Linq
open System.IO

open Fake.Core
Expand All @@ -26,7 +27,14 @@ let inline redirect () =
DotNet.Options.lift (fun opts -> { opts with RedirectOutput = true })

let uninstallTemplate () =
DotNet.exec (opts() >> redirect()) "new" (sprintf "-u %s" templatePackageName)
let result = DotNet.exec (opts() >> redirect()) "new" $"-u %s{templatePackageName}"

// we will check if the install command has returned error and message is template is not found.
// if that is the case, then we will just redirect output as success and change process result to
// exit code of zero.
match result.Results.Any(fun (result:ConsoleMessage) -> result.Message.Equals $"The template package '{templatePackageName}' is not found.") with
| true -> ProcessResult.New 0 result.Results
| false -> result

let installTemplateFrom pathToNupkg =
DotNet.exec (opts() >> redirect()) "new" (sprintf "-i %s" pathToNupkg)
Expand Down