Skip to content

Commit 5da09f0

Browse files
committed
template testing
1 parent 882371e commit 5da09f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build.fsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,21 @@ Target "Pack" (fun _ ->
162162
Target "TestTemplatesNuGet" (fun _ ->
163163

164164
// Globally install the templates from the template nuget package we just built
165-
DotNetCli.RunCommand id ("new -i " + outputPath + "/FSharp.TypeProviders.Templates." + release.NugetVersion + ".nupkg")
165+
DotNetCli.RunCommand (fun p -> { p with ToolPath = getSdkPath() }) ("new -i " + outputPath + "/FSharp.TypeProviders.Templates." + release.NugetVersion + ".nupkg")
166166

167167
// Instantiate the template into a randomly generated name
168168
let testAppName = "tp2" + string (abs (hash System.DateTime.Now.Ticks) % 100)
169169
CleanDir testAppName
170-
DotNetCli.RunCommand id (sprintf "new typeprovider -n %s -lang F#" testAppName)
170+
DotNetCli.RunCommand (fun p -> { p with ToolPath = getSdkPath() }) (sprintf "new typeprovider -n %s -lang F#" testAppName)
171171

172172
let pkgs = Path.GetFullPath(outputPath)
173173

174174
// NOTE: when restoring this won't use the local version of TPSDK but the one in github. Perhaps we can use
175175
// this local repo as a source for the paket update, or remove the use of paket in the template
176176
execIn testAppName ".paket/paket.exe" "update"
177177

178-
DotNetCli.RunCommand (fun p -> { p with WorkingDir=testAppName }) (sprintf "build -c debug")
179-
DotNetCli.RunCommand (fun p -> { p with WorkingDir=testAppName }) (sprintf "test -c debug")
178+
DotNetCli.RunCommand (fun p -> { p with ToolPath = getSdkPath(); WorkingDir=testAppName }) (sprintf "build -c debug")
179+
DotNetCli.RunCommand (fun p -> { p with ToolPath = getSdkPath(); WorkingDir=testAppName }) (sprintf "test -c debug")
180180

181181
(* Manual steps without building nupkg
182182
dotnet pack src\FSharp.TypeProviders.SDK.fsproj /p:PackageVersion=0.0.0.99 --output bin -c release

0 commit comments

Comments
 (0)