Rename GitTally to Werkator

`gitTally` is the name of another product in the git space, so the
rename is a precaution; nothing about what the build system does changes.

The name follows one rule: `Werkator` where it is prose, capitalized
where it is a Kotlin type and its file, lowercase everywhere a machine
reads it — the command, packages, paths, configuration keys and values,
the Gitea check context. Environment variables keep their convention and
are uppercase throughout.

Every configuration file is still found under its pre-rename name
(`ConfigFiles`): `.gittally.yml` at the repository root, in a build
worktree and as committed on a branch, `.git/gittally/.gittally.yml` for
the machine layer. The current name wins where both exist, and the old
file is then ignored rather than merged — two files side by side are a
half-done rename, not a layering. Without the fallback an installation
that updated without renaming would not fail: a configuration that is
not found leaves every setting at its default, so it would come up
looking healthy while having forgotten its credentials and its builds.

`docs/werkator-migrationsplan.md` lists what the fallback does not
cover and has to be moved by hand — above all the state directory
`.git/werkator/`, which holds the build history, the control token and
the worktrees, and has no fallback of its own.

`docs/migration-from-legacy.md` is deleted with this: it mapped the
legacy script's environment variables, and every host it addressed has
long since moved to the YAML configuration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mhoennig
2026-08-30 19:39:55 +02:00
co-authored by Claude Opus 5
parent 7f550689dd
commit 35f06ec1ec
156 changed files with 604 additions and 401 deletions
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Example: set up a werkator instance that watches and builds werkator itself.
# Run from inside a working checkout of the werkator repository.
# Example: set up a Werkator instance that watches and builds Werkator itself.
# Run from inside a working checkout of the Werkator repository.
#
# Usage:
# GIT_ACCOUNT=mi GIT_TOKEN=xxxx ./docs/examples/setup-werkator-selfhost.sh
@@ -15,7 +15,7 @@ SERVER_PORT="${SERVER_PORT:-18080}"
DEV_CHECKOUT=$(git rev-parse --show-toplevel)
ORIGIN_URL="${ORIGIN_URL:-$(git -C "$DEV_CHECKOUT" remote get-url origin)}"
# 1. Build the werkator jar — the last Gradle run you ever start by hand.
# 1. Build the Werkator jar — the last Gradle run you ever start by hand.
(cd "$DEV_CHECKOUT" && ./gradlew --console=plain build)
# 2. Dedicated clone: builds run in worktrees under its .git/werkator/worktrees,
@@ -43,17 +43,17 @@ server:
EOF
chmod 600 .git/werkator/.werkator.yml
# The committed .werkator.yml already builds werkator itself:
# The committed .werkator.yml already builds Werkator itself:
# buildCommand: ./gradlew --console=plain --no-daemon test
# artifactDirs: [build/reports]
# 5. Optional kick-start: put the local ref one commit behind origin so the very
# first poll triggers a build — otherwise werkator waits for the next push.
# first poll triggers a build — otherwise Werkator waits for the next push.
# Builds never move this ref or touch this checkout, so lagging is harmless.
git reset --hard --quiet HEAD~1 || true
# 6. Run it (Ctrl-C stops it cleanly). For a permanent setup, run
# `java -jar "$INSTALL_DIR/werkator.jar" init --systemd` here instead and follow
# docs/deployment.md — the generated unit points at this jar and repo.
echo "werkator self-host: http://localhost:$SERVER_PORT/ — watching $ORIGIN_URL"
echo "Werkator self-host: http://localhost:$SERVER_PORT/ — watching $ORIGIN_URL"
exec java -jar "$INSTALL_DIR/werkator.jar" server
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Example: start a werkator test server watching a scratch repository with a fake build.
# Example: start a Werkator test server watching a scratch repository with a fake build.
# This is the setup used for the manual UI/API smoke tests during development:
# a local bare origin (with a second branch for the Branches view), a slow fake
# build with live log output and a demo report artifact, and a fast poll
@@ -21,7 +21,7 @@ export BUILD_SECONDS="${BUILD_SECONDS:-25}" # inherited by the build process a
DEV_CHECKOUT=$(git rev-parse --show-toplevel)
# 1. Build the werkator jar.
# 1. Build the Werkator jar.
(cd "$DEV_CHECKOUT" && ./gradlew --console=plain build)
mkdir -p "$INSTALL_DIR"
cp "$DEV_CHECKOUT/build/libs/werkator.jar" "$INSTALL_DIR/werkator.jar"
@@ -39,7 +39,7 @@ if ! git -C "$INSTALL_DIR/work" rev-parse --quiet --verify HEAD >/dev/null; then
cat > "$INSTALL_DIR/work/fake-build.sh" <<'EOF'
#!/usr/bin/env bash
# Fake build: visible progress for the live log, then a demo report artifact.
# werkator exports `branch`; BUILD_SECONDS is inherited from the server process.
# Werkator exports `branch`; BUILD_SECONDS is inherited from the server process.
set -euo pipefail
echo "fake build of branch ${branch:-unknown} at commit $(git rev-parse --short HEAD)"
if git log -1 --pretty=%s | grep -qF '[fail]'; then
@@ -101,7 +101,7 @@ git reset --hard --quiet HEAD~1 || true
# 5. Run it (Ctrl-C stops it cleanly).
echo
echo "werkator test server: http://localhost:$SERVER_PORT/"
echo "Werkator test server: http://localhost:$SERVER_PORT/"
echo "Trigger a build: git -C $INSTALL_DIR/work commit --allow-empty -m 'trigger build' && git -C $INSTALL_DIR/work push"
echo "Trigger a failure: same with commit message 'trigger [fail]'"
echo