Commit 4146be0
refactor: reset kernel source to tag between build iterations
Four folded changes, all aimed at making the build loop safe to run
when source files have been mutated by a previous iteration and
producing clear errors when tag resolution fails:
* Replace `git checkout <tag>` with `git reset --hard <tag>` followed by
`git clean -fdx` (extracting the tag into a local variable).
* Bail with a clear error if `get_tag` finds no matching tag, so the
build doesn't fall through to `git reset --hard ""`.
* Move the config copy to after the reset so it isn't clobbered by
`git clean`.
* Drop the now-redundant `make distclean || true` at the top of the
script — `git clean -fdx` inside `build_version` strictly subsumes it.
Behavior is identical for the no-patches case (the tag tree is unchanged
so reset is a no-op). Prep work for applying out-of-tree patches.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Nikita Kalyazin <nikita.kalyazin@e2b.dev>1 parent f371098 commit 4146be0
1 file changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
48 | 59 | | |
49 | 60 | | |
50 | 61 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
| |||
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
95 | | - | |
96 | | - | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| |||
0 commit comments