Commit 0a997e9
[MISC] Reject no-op OSS releases when there are no new commits (#2117)
* [MISC] Reject no-op OSS releases when there are no new commits
create-release.yaml computed and published a new tag even when the branch had
no commits beyond the last release, producing empty releases (e.g. v0.177.1
points at the exact same commit as v0.177.0).
Add a guard after "Fetch base release version": use the compare API's ahead_by
(the workflow has no local checkout) to count commits on the branch beyond the
latest release tag. If zero, abort with a clear error (dry-run only warns).
Works for main and hotfix branches alike.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* [MISC] Harden no-op guard: validate ahead_by, fail loudly on unexpected value
PR review (Greptile + internal): `[[ "$AHEAD" -eq 0 ]]` mishandled a non-integer
ahead_by — an empty value evaluated true ([[ "" -eq 0 ]]) and would wrongly
reject a legitimate release, and a literal "null" aborted with a cryptic
"integer expression expected" / unbound-variable error.
Use `--jq '.ahead_by // empty'`, fail loudly if the compare API call fails, and
require ahead_by to match ^[0-9]+$ (error out otherwise) before a string compare
against "0". A transient/auth/shape error now fails the step with a clear
message instead of being mistaken for "no new commits".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 7321a7c commit 0a997e9
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
129 | 161 | | |
130 | 162 | | |
131 | 163 | | |
| |||
0 commit comments