implemented 04-build-executor.md incl. concurrency amendment: async builds in per-branch worktrees, builds.maxConcurrent, cancellation, live logs; fix .gitignore build/ rule that silently excluded the de.hoennig.gittally.build package (also recovers the step-01 domain files)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ae3ae7aa04
commit
b379bc0a6b
@@ -157,6 +157,28 @@ class GitService(
|
||||
.stdout
|
||||
.trim()
|
||||
|
||||
/** Creates a worktree at [path] with [commit] checked out as a detached HEAD; [path] must not exist yet. */
|
||||
fun worktreeAdd(
|
||||
path: Path,
|
||||
commit: String,
|
||||
workingDir: Path = Paths.get("."),
|
||||
) {
|
||||
runner.runOrThrow(listOf("git", "worktree", "add", "--detach", path.toString(), commit), workingDir)
|
||||
}
|
||||
|
||||
/** Removes registrations of worktrees whose directories no longer exist. */
|
||||
fun worktreePrune(workingDir: Path = Paths.get(".")) {
|
||||
runner.runOrThrow(listOf("git", "worktree", "prune"), workingDir)
|
||||
}
|
||||
|
||||
/** Checks out [commit] as a detached HEAD, discarding local modifications to tracked files. */
|
||||
fun checkoutDetached(
|
||||
commit: String,
|
||||
workingDir: Path = Paths.get("."),
|
||||
) {
|
||||
runner.runOrThrow(listOf("git", "checkout", "--force", "--detach", commit), workingDir)
|
||||
}
|
||||
|
||||
private fun refExists(
|
||||
ref: String,
|
||||
workingDir: Path,
|
||||
|
||||
Reference in New Issue
Block a user