Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -412,4 +412,4 @@ FodyWeavers.xsd
mise.local.toml

# Generated from the F# build targets by `mise install` (see mise.toml)
.make/
.runna/
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Elastic's documentation build toolchain. Processes Markdown from multiple repos

## Essential Commands

[mise](https://mise.jdx.dev) is the entry point. `mise install` provisions the .NET SDK (from `global.json`) and Node (from `.nvmrc`), restores the local dotnet tools and installs the git hooks. `mise tasks` lists every task. `build.sh` and `dev.sh` still work. Most tasks are generated from the targets of the F# build (`build/Targets.fs`; `./build.sh --help` lists them): `mise install` writes the gitignored `.make/mise-tasks.toml`, so a new target is a mise task without editing `mise.toml`. Until `mise install` has run in a clone, those tasks do not exist. The `snap:*` and `journeys:*` tasks stay in `mise.toml` until [nullean/argh#142](https://github.com/nullean/argh/issues/142) lets a namespaced target take options.
[mise](https://mise.jdx.dev) is the entry point. `mise install` provisions the .NET SDK (from `global.json`) and Node (from `.nvmrc`), restores the local dotnet tools and installs the git hooks. `mise tasks` lists every task. `build.sh` and `dev.sh` still work. Most tasks are generated from the targets of the F# build (`build/Targets.fs`; `./build.sh --help` lists them): `mise install` writes the gitignored `.runna/mise-tasks.toml`, so a new target is a mise task without editing `mise.toml`. Until `mise install` has run in a clone, those tasks do not exist. The `snap:*` and `journeys:*` tasks stay in `mise.toml` until [nullean/argh#142](https://github.com/nullean/argh/issues/142) lets a namespaced target take options.

```bash
mise trust # once per clone, in the root git folder; its worktrees are trusted too
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The everyday tasks:
| `mise run site:build`, `site:test`, `site:lint`, `site:fmt`, `site:check` | The frontend scripts in `src/Elastic.Documentation.Site` |
| `mise run schema` | Regenerate `docs/cli-schema.json` |

`./build.sh` and `./dev.sh` still work. Most mise tasks are generated from the targets of the build project (`./build.sh --help`), so `./build.sh test` and `mise run test` are the same command; `mise install` regenerates them into `.make/`, which is gitignored.
`./build.sh` and `./dev.sh` still work. Most mise tasks are generated from the targets of the build project (`./build.sh --help`), so `./build.sh test` and `mise run test` are the same command; `mise install` regenerates them into `.runna/`, which is gitignored.

### Docker, without local installs (`./dev.sh`)

Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</ItemGroup>
<!-- Build -->
<ItemGroup>
<PackageVersion Include="Nullean.Make.Fs" Version="0.30.0" />
<PackageVersion Include="Runna.Fs" Version="0.2.0" />
<PackageVersion Include="Proc.Fs" Version="0.22.1" />
<PackageVersion Include="FSharp.Core" Version="11.0.101" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions build/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open System.IO.Compression
open System.Text.Json
open System.Text
open Nullean.Argh
open Nullean.Make.Fs
open Nullean.Runna.Fs
open Proc.Fs
open BuildInformation

Expand Down Expand Up @@ -209,7 +209,7 @@ let private containerProjects =
let private siteDir = "src/Elastic.Documentation.Site"

let Run (argv: string[]) =
let app = MakeApp<Target>("build", None)
let app = RunnaApp<Target>("build", None)
let skipDirtyCheck = app.Flag("--skip-dirty-check", short = "-c", desc = "Skip the clean checkout check that guards the release/publish targets")
app.Default Build

Expand Down Expand Up @@ -377,7 +377,7 @@ let Run (argv: string[]) =
sh $"docker run -p 127.0.0.1:8080:8080 elastic-docs-air-gapped" }
|> needsTool [ "docker" ]

// Make.Fs only hands over the option once the Compile dependency has run, so check the value here to fail a typo fast.
// Runna only hands over the option once the Compile dependency has run, so check the value here to fail a typo fast.
// Enum.TryParse also accepts numbers and comma lists, so compare with the declared names.
let isSuite (value: string) =
Enum.GetNames<TestSuite>() |> Array.exists (fun name -> name.Equals(value, StringComparison.OrdinalIgnoreCase))
Expand Down
2 changes: 1 addition & 1 deletion build/build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nullean.Make.Fs" />
<PackageReference Include="Runna.Fs" />
<PackageReference Include="Proc.Fs" />
<PackageReference Include="FSharp.Core" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DOTNET_CLI_TELEMETRY_OPTOUT = "1"
[task_config]
# Generated from the targets of the F# build (build/Targets.fs) by `mise install` and gitignored, so there is no list to keep in step:
# `mise run test` is `dotnet run --project build -c release -- test`. A task in this file wins over an included one of the same name.
includes = [".make/mise-tasks.toml"]
includes = [".runna/mise-tasks.toml"]

[hooks]
postinstall = "dotnet tool restore && dotnet husky install && mise run sync-tasks"
Expand All @@ -24,9 +24,9 @@ postinstall = "dotnet tool restore && dotnet husky install && mise run sync-task
patterns = ["build/*.fs"]
task = "sync-tasks"

# The one command that writes .make/mise-tasks.toml, shared by the postinstall and watch_files hooks so they cannot drift apart.
# The one command that writes .runna/mise-tasks.toml, shared by the postinstall and watch_files hooks so they cannot drift apart.
[tasks.sync-tasks]
description = "Regenerate .make/mise-tasks.toml from the targets of the F# build"
description = "Regenerate .runna/mise-tasks.toml from the targets of the F# build"
hide = true
run = "dotnet run --project build -c release -- __wrappers sync --quiet --run 'dotnet run --project build -c release --' --only mise"

Expand Down
Loading