54 lines
2.1 KiB
Markdown
54 lines
2.1 KiB
Markdown
# TDLM/FindIt — patch layer over GTNewHorizons/FindIt
|
|
|
|
This repository does not contain FindIt's source. It contains:
|
|
|
|
| Path | What |
|
|
|---|---|
|
|
| `upstream/` | git submodule → `GTNewHorizons/FindIt`, pinned to one commit |
|
|
| `patches/` | our changes, as ordered `git format-patch` files |
|
|
| `settings.gradle.kts` | the layer's only build file: the [Stratum](https://git.potatolab.uk/TDLM/stratum) version and `stratum { }` |
|
|
| `.github/workflows/build.yml` | our CI: apply patches → build → publish to the TDLM registry |
|
|
| `.github/workflows/upstream-sync.yml` | daily: bump upstream, re-apply patches, open a PR |
|
|
|
|
The build never touches `upstream/`. `./gradlew applyPatches` clones it into `work/` (git-ignored), applies
|
|
`patches/*.patch` with `git am --3way`, and Gradle runs inside `work/`.
|
|
|
|
## Everyday commands
|
|
|
|
```bash
|
|
./gradlew applyPatches build # (re)create work/ = upstream + patches, then build
|
|
./gradlew upstream --tasks="runClient" # any upstream task
|
|
./gradlew printVersion # the coordinate this commit publishes
|
|
```
|
|
|
|
### Change or add a patch
|
|
|
|
```bash
|
|
./gradlew applyPatches
|
|
cd work
|
|
# edit, then: git commit -am "what and why" (one commit = one patch; `git rebase -i` to reorder/squash)
|
|
cd .. && ./gradlew exportPatches # rewrites patches/
|
|
git add patches && git commit
|
|
```
|
|
|
|
### Take new upstream changes
|
|
|
|
```bash
|
|
./gradlew updateUpstream # pins upstream's tip, re-applies every patch
|
|
```
|
|
|
|
If a patch conflicts, `work/` is left in the middle of `git am` with the conflict in place:
|
|
|
|
```bash
|
|
cd work && <fix> && git add -A && git am --continue
|
|
cd .. && ./gradlew exportPatches && git add upstream patches && git commit
|
|
```
|
|
|
|
A patch that upstream has since fixed or absorbed can simply be deleted from `patches/`.
|
|
|
|
## Policy
|
|
|
|
- Upstream wins. Keep a patch only if upstream does not already have the behaviour.
|
|
- Patches that are generally useful (performance, compat fixes) should be sent upstream and then dropped here.
|
|
- Patches never carry publishing settings; Stratum owns the Maven identity and destination.
|