Skip to content

Commit fe22252

Browse files
committed
Try to get the template integration tests working by making them use the 8.0.0 alpha build
Instead of pulling the 6.1.X build off NuGet.org. This might bootstrap the tests enough to get them all passing
1 parent 2fc0ca8 commit fe22252

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

src/app/fake-cli/fake-cli.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PackAsTool>true</PackAsTool>
44
<OutputType>Exe</OutputType>
55
<ToolCommandName>fake</ToolCommandName>
6-
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
6+
<TargetFramework>net8.0</TargetFramework>
77
<RollForward>Major</RollForward>
88
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
99
<!-- Debian packaging -->

src/template/fake-template/Content/.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"tools": {
55
"fake-cli": {
66
//#if (version == "latest")
7-
"version": "6.1.3",
7+
"version": "8.0.0-alpha",
88
////#else
99
//"version": "(version)",
1010
//#endif
@@ -13,4 +13,4 @@
1313
]
1414
}
1515
}
16-
}
16+
}

src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,32 @@ let isProcessSucceeded message (r: ProcessResult<ProcessOutput>) =
6969

7070
let timeout = (TimeSpan.FromMinutes 10.)
7171

72+
let writeTestNuGetConfig rootDir =
73+
74+
let nugetConfigFilePath = System.IO.Path.Combine(rootDir, "NuGet.config")
75+
76+
let nugetPackageFolder =
77+
System.IO.Path.Combine(__SOURCE_DIRECTORY__, "..", "..", "..", "release", "dotnetcore")
78+
79+
let nugetConfig =
80+
$"""<?xml version="1.0" encoding="utf-8"?>
81+
<configuration>
82+
<packageSources>
83+
<clear />
84+
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
85+
<add key="localBuild" value="{nugetPackageFolder}" />
86+
</packageSources>
87+
</configuration>
88+
"""
89+
90+
System.IO.File.WriteAllText(nugetConfigFilePath, nugetConfig)
91+
7292
let runTemplate rootDir kind dependencies dsl =
7393
Directory.ensure rootDir
7494

7595
try
96+
writeTestNuGetConfig rootDir
97+
7698
let result =
7799
DotNet.exec
78100
(dotnetWorkingDir rootDir >> redirect ())

0 commit comments

Comments
 (0)