Skip to content

fix: stop publishing artefacts named "0.2.x # x-release-please-version" - #27

Merged
ExtraToast merged 1 commit into
mainfrom
fix/corrupt-gradle-version
Sep 2, 2026
Merged

fix: stop publishing artefacts named "0.2.x # x-release-please-version"#27
ExtraToast merged 1 commit into
mainfrom
fix/corrupt-gradle-version

Conversation

@ExtraToast

Copy link
Copy Markdown
Contributor

What shipped

Every Maven release so far is published with the release-please marker inside its version:

net.blueshell.clients:brevo-client:0.2.6 # x-release-please-version

Java .properties has no trailing-comment syntax, so version=0.2.6 # x-release-please-version sets the version to that whole string. Gradle resolved it verbatim and named the jar after it. The npm package was unaffected — package.json is JSON.

The fix

The marker now brackets the line using release-please's x-release-please-start-version / x-release-please-end block form, leaving the property value clean.

The checks were complicit

The release workflow read the version with sed 's/^version=\([^ ]*\).*/\1/p' — everything up to the first space — so it saw a clean 0.2.6 and passed. Both that check and a new CI gate now ask Gradle for the version it resolved instead of re-parsing the file, and the gate asserts both packages carry a bare semver string and agree with each other. It was verified to fail against the corrupt value before being committed.

⚠️ The already-published Maven versions cannot be fixed in place and should probably be deleted — that needs someone with package-admin rights.

Java .properties has no trailing-comment syntax, so

  version=1.0.0 # x-release-please-version

sets the version to that entire string. Gradle resolved it verbatim, named the
jar after it, and published it that way. Every Maven release so far carries the
marker in its version. The npm package was unaffected, because package.json is
JSON.

The marker now brackets the line using release-please's start/end block form,
which leaves the property value clean.

Two checks were complicit and are fixed too. The release workflow read the
version with sed taking everything up to the first space, so it saw a clean
"0.2.6" and passed -- a check written in exactly the way that hides this. Both
it and a new CI gate now ask Gradle for the version it actually resolved, and
the gate additionally asserts both packages carry a bare semver string and
agree with each other. It was verified failing against the corrupt value before
being committed.
@ExtraToast
ExtraToast force-pushed the fix/corrupt-gradle-version branch from dae7103 to e573e14 Compare September 2, 2026 21:52
@ExtraToast
ExtraToast merged commit b01cad2 into main Sep 2, 2026
3 checks passed
@ExtraToast
ExtraToast deleted the fix/corrupt-gradle-version branch September 2, 2026 21:53
@github-actions github-actions Bot mentioned this pull request Sep 2, 2026
github-actions Bot added a commit that referenced this pull request Sep 2, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>1.0.1</summary>

##
[1.0.1](v1.0.0...v1.0.1)
(2026-09-02)


### Bug Fixes

* **ci:** repair CodeQL and read the version from a ref that may predate
the task
([#29](#29))
([5bbbdf4](5bbbdf4))
* stop publishing artefacts named "0.2.x # x-release-please-version"
([#27](#27))
([b01cad2](b01cad2))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant