Skip to content

Commit

Permalink
fix: run fake though fsi
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-tihon committed Mar 12, 2024
1 parent f25b41e commit 5d306c6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- name: Setup .NET 6.0 SDK (for FAKE)
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Setup .NET 8.0 SDK
uses: actions/setup-dotnet@v2
with:
Expand All @@ -32,4 +25,4 @@ jobs:
- name: Paket Restore
run: dotnet paket restore
- name: Build and Test
run: dotnet fake run build.fsx
run: dotnet fsi build.fsx
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
dotnet tool restore
dotnet paket restore
dotnet fake run build.fsx %*
dotnet fsi build.fsx %*
38 changes: 22 additions & 16 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
#r @"paket:
source https://nuget.org/api/v2
framework net6.0
nuget FSharp.Core 6.0.0.0
nuget Fake.Core.Target
nuget Fake.Core.Process
nuget Fake.Core.ReleaseNotes
nuget Fake.IO.FileSystem
nuget Fake.DotNet.Cli
nuget Fake.DotNet.MSBuild
nuget Fake.DotNet.AssemblyInfoFile
nuget Fake.DotNet.Paket
nuget Fake.DotNet.FSFormatting
nuget Fake.Tools.Git
nuget Fake.Api.GitHub //"
#load "./.fake/build.fsx/intellisense.fsx"
#load ".fake/build.fsx/intellisense.fsx"

// Boilerplate - https://github.com/fsprojects/FAKE/issues/2719#issuecomment-1470687052
System.Environment.GetCommandLineArgs()
|> Array.skip 2 // skip fsi.exe; build.fsx
|> Array.toList
|> Fake.Core.Context.FakeExecutionContext.Create false __SOURCE_FILE__
|> Fake.Core.Context.RuntimeContext.Fake
|> Fake.Core.Context.setExecutionContext

// the rest of your original build.fsx content...
#r "nuget: Fake.Core.Target"
#r "nuget: Fake.Core.Process"
#r "nuget: Fake.Core.ReleaseNotes"
#r "nuget: Fake.IO.FileSystem"
#r "nuget: Fake.DotNet.Cli"
#r "nuget: Fake.DotNet.MSBuild"
#r "nuget: Fake.DotNet.AssemblyInfoFile"
#r "nuget: Fake.DotNet.Paket"
#r "nuget: Fake.DotNet.FSFormatting"
#r "nuget: Fake.Tools.Git"
#r "nuget: Fake.Api.GitHub"

open Fake
open Fake.Core.TargetOperators
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ then
else
dotnet tool restore
dotnet paket restore
dotnet fake run build.fsx $@
fi
dotnet fsi build.fsx $@
fi

0 comments on commit 5d306c6

Please sign in to comment.