v0.2.1 98594d0

build.sh RawHistoryFolder

1#!/bin/sh
2# SPDX-License-Identifier: MIT
3#
4# Builds the runner-oracle for package action and runs it on the files in
5# ../../testdata/cases, writing ../../testdata/runner.json, and on each line of
6# ../../testdata/uses.txt as the "uses" of a one-step composite action, writing
7# ../../testdata/uses.json.
8#
9#   RUNNER_CLONE=~/dev/clones/runner action/gen/runner/build.sh
10#
11# Requirements: a clone of https://github.com/actions/runner at the commit in
12# runner-commit.txt (checked), the .NET SDK, network access for NuGet
13# (restoring the runner's packages), and a .NET runtime of version 8 or newer
14# (the Sdk project targets net8.0; DOTNET_ROLL_FORWARD=Major runs it on a newer
15# runtime). The clone is copied to a temporary directory, never modified.
16set -eu
17here=$(cd "$(dirname "$0")" && pwd)
18: "${RUNNER_CLONE:?set RUNNER_CLONE to a clone of actions/runner}"
19want=$(cat "$here/runner-commit.txt")
20have=$(git -C "$RUNNER_CLONE" rev-parse HEAD)
21[ "$have" = "$want" ] || { echo "runner clone is at $have, want $want" >&2; exit 1; }
22git -C "$RUNNER_CLONE" diff --quiet -- src/Sdk src/Runner.Worker/action_yaml.json || { echo "runner clone is modified" >&2; exit 1; }
23work=$(mktemp -d)
24trap 'rm -rf "$work"' EXIT
25cp -r "$RUNNER_CLONE/src/Sdk" "$work/Sdk"
26cp "$RUNNER_CLONE/src/Directory.Build.props" "$RUNNER_CLONE/src/NuGet.Config" "$work/" 2>/dev/null || true
27cp "$here/Driver.cs" "$work/Sdk/Driver.cs"
28(cd "$work/Sdk" && dotnet build Sdk.csproj -c Release -p:OutputType=Exe -p:RuntimeIdentifiers= -v:q -nologo >&2)
29out="$here/../../testdata/runner.json"
30DOTNET_ROLL_FORWARD=Major dotnet "$work/Sdk/bin/Release/net8.0/Sdk.dll" \
31	"$RUNNER_CLONE/src/Runner.Worker/action_yaml.json" "$here/../../testdata/cases" > "$out"
32echo "wrote $out" >&2
33out="$here/../../testdata/uses.json"
34DOTNET_ROLL_FORWARD=Major dotnet "$work/Sdk/bin/Release/net8.0/Sdk.dll" \
35	"$RUNNER_CLONE/src/Runner.Worker/action_yaml.json" "$here/../../testdata/cases" "$here/../../testdata/uses.txt" > "$out"
36echo "wrote $out" >&2

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 3

↑↓ moveenter openesc close