Skip to content

Commit b61c7f4

Browse files
Added some helpful guidance for running as a local tool (#345)
1 parent 7db2db6 commit b61c7f4

File tree

2 files changed

+45
-27
lines changed

2 files changed

+45
-27
lines changed

.incrementalist/incrementalist.graphcache.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,51 @@ Install the command-line tool globally:
3232
dotnet tool install --global Incrementalist.Cmd
3333
```
3434

35+
Or install locally in your project:
36+
37+
```shell
38+
# From your repository root
39+
dotnet new tool-manifest # if you haven't already created a .config/dotnet-tools.json
40+
dotnet tool install Incrementalist.Cmd
41+
```
42+
43+
### Running as a Global Tool
44+
45+
When installed globally, run commands directly using the `incrementalist` command:
46+
47+
```shell
48+
# Get list of affected projects
49+
incrementalist -b dev -f ./affected-projects.txt
50+
51+
# Run tests for affected projects
52+
incrementalist -b dev -r -- test -c Release --no-build --nologo
53+
```
54+
55+
### Running as a Local Tool
56+
57+
When using Incrementalist as a local tool, you need to use `dotnet tool run` with an additional `--` before the Incrementalist commands:
58+
59+
```shell
60+
# Get list of affected projects
61+
dotnet tool run incrementalist -- -b dev -f ./affected-projects.txt
62+
63+
# Build affected projects
64+
dotnet tool run incrementalist -- -b dev -r -- build -c Release --nologo
65+
66+
# Run tests with coverage
67+
dotnet tool run incrementalist -- -b dev -r -- test -c Release --no-build --logger:trx --collect:"XPlat Code Coverage" --results-directory ./testresults
68+
69+
# Run in parallel mode
70+
dotnet tool run incrementalist -- -b dev -r --parallel -- build -c Release --nologo
71+
72+
# Save affected projects AND run commands
73+
dotnet tool run incrementalist -- -b dev -f ./affected-projects.txt -r -- build -c Release --nologo
74+
```
75+
76+
Note the command structure when using as a local tool:
77+
- First `--` after `dotnet tool run incrementalist` is for Incrementalist options
78+
- Second `--` (if using `-r`) is for the dotnet command to run on affected projects
79+
3580
## 🚀 Quick Start Examples
3681

3782
```shell

0 commit comments

Comments
 (0)