Skip to content

Commit 00d94a0

Browse files
committed
README.md: add nice 'make' experience
In Unix, it's just the simplest Makefile that calls FAKE underneath. In Windows, it's a batch file that does the same.
1 parent 74f3f43 commit 00d94a0

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

.github/workflows/build+test+deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
- name: Restore dependencies
3434
run: dotnet restore
3535
- name: Build
36-
run: dotnet fake build -t Build
36+
run: make
3737
- name: Run tests
38-
run: dotnet fake build -t Test
38+
run: make check
3939
- name: Run FSharpLint on itself
4040
run: dotnet fake build -t SelfCheck
4141

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
all:
2+
which dotnet > /dev/null || { echo "ERROR: dotnet not found. Please ensure you have installed the .NET SDK (v6 or higher)" >&2; exit 1; }
3+
dotnet fake build --target Build
4+
5+
check:
6+
dotnet fake build --target Test

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Package | Version
3434

3535
1. Make sure you've installed the .NET version defined in [global.json](global.json)
3636
2. Run `dotnet tool restore` to install all developer tools required to build the project
37-
3. Run `dotnet fake build -t Build` to build (which executes the `Build` target from the FAKE-based [build script](build.fsx))
37+
3. Run `make` to build (which executes the `Build` target from the FAKE-based [build script](build.fsx))
3838
4. To run tests use `dotnet fake build -t Test`
3939
5. To build documentation use `dotnet fake build -t Docs`
4040

make.bat

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@ECHO OFF
2+
where /q dotnet
3+
IF ERRORLEVEL 1 (
4+
ECHO "Please install .NETv6 or higher" && EXIT /b 1
5+
) ELSE (
6+
IF "%~1" == "" (
7+
dotnet fake build --target Build
8+
) ELSE (
9+
IF "%~1" == "check" (
10+
dotnet fake build --target Test
11+
) ELSE (
12+
ECHO "Target was not recognized" && EXIT /b 1
13+
)
14+
)
15+
)
16+

0 commit comments

Comments
 (0)