Commit 120e275
committed
ci(vendor-hash): restore real hash before unchanged-check early-return
The workflow replaces vendorHash with a fake sentinel before calling
nix build, parses the real hash from the "got:" line, and substitutes
it back. When old_hash equals new_hash, the early-return branch was
exiting before performing that final substitution, leaving the fake
hash in nix/package.nix. Combined with go.mod/go.sum changes from
go mod tidy, the Commit and push step then committed the fake hash.
See PR #974 for a concrete occurrence.
Move the restoration sed ahead of the unchanged check so the file is
always in a valid state before any exit. Also pipe grep through
head -n1 to defend against multi-line output (e.g. multiple FOD
failures reporting their own got: lines).1 parent f3ff269 commit 120e275
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
119 | | - | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| |||
0 commit comments