Refactor run-aspire scripts for improved cross-platform support. Replace run-aspire.cmd with run-aspire.ps1 for Windows and add run-aspire.sh for Ubuntu. Update documentation to reflect these changes and ensure synchronization between build rules across scripts. Enhance Tailscale integration and clarify usage instructions.
This commit is contained in:
@@ -53,11 +53,13 @@ npm --prefix src/HSchool.Client run build
|
||||
dotnet run --project src/HSchool.AppHost
|
||||
```
|
||||
|
||||
`run-aspire.cmd` is the Windows entry point: it skips MSBuild when AppHost and Server dlls are
|
||||
newer than C# / csproj / props. Pass `--rebuild` to force a build. When `tailscale` is on PATH
|
||||
it also runs `tailscale serve --bg 5173` when `tailscale` is on PATH and connected; otherwise
|
||||
it warns and continues locally only. Pass `--no-tailscale` to skip Serve. Keep the script in sync
|
||||
with `tools/apphost-uptodate.ps1` if the AppHost path ever moves.
|
||||
`run-aspire.ps1` is the Windows entry point (`run-aspire.cmd` just forwards to it);
|
||||
`run-aspire.sh` is the same on Ubuntu. They skip MSBuild when AppHost and Server dlls are
|
||||
newer than C# / csproj / props. Pass `--rebuild` to force a build. When `tailscale` is on
|
||||
PATH and connected they run `tailscale serve --bg 5173` and print the HTTPS client URL;
|
||||
otherwise they warn and continue locally only. Pass `--no-tailscale` to skip Serve. Keep
|
||||
`tools/apphost-uptodate.ps1`, `LaunchBuildStamp`, and `needs_build` in `run-aspire.sh` in
|
||||
sync if the AppHost path ever moves.
|
||||
|
||||
`dotnet run --project src/HSchool.AppHost` still compiles every time — that is for a dirty tree,
|
||||
not a fast relaunch. It starts the server *and* the Vite dev server and opens the Aspire
|
||||
@@ -201,6 +203,6 @@ only resolved a status line. Solution-wide is CI.
|
||||
keep going out. Opening sends one extra snapshot. A test that waits for *people* on pause
|
||||
will hang; a test that waits for a lesson label will not.
|
||||
- **`dotnet run` on the AppHost always evaluates MSBuild**, even when nothing changed.
|
||||
`run-aspire.cmd` skips that with `--no-build` when AppHost and Server dlls are newer than
|
||||
C# / csproj / props. `--rebuild` forces a build. Bare `dotnet run --project src/HSchool.AppHost`
|
||||
still compiles.
|
||||
`run-aspire.ps1` / `run-aspire.sh` skip that with `--no-build` when AppHost and Server dlls
|
||||
are newer than C# / csproj / props. `--rebuild` forces a build. Bare
|
||||
`dotnet run --project src/HSchool.AppHost` still compiles.
|
||||
|
||||
Reference in New Issue
Block a user