Skip to content

Commit b1328e1

Browse files
authored
chore(release): prepare v0.1.3 + auto-sync the bundle version pin in CI (#5)
The skill launcher (bin/sonar) reads SONAR_BUNDLE_VERSION from plugin/skills/sonar-predictor/config.env to decide which sonar-predictor-dist-<version>.zip to fetch from Maven Central on first invocation. If that pin lags behind the release tag, every installed plugin pulls the wrong bundle. Two changes here: 1. Bump SONAR_BUNDLE_VERSION 0.1.1 -> 0.1.3 in config.env so the v0.1.3 release artifact ships the correct pin. 2. Add a publish.yml step that sed-bumps that pin to match the derived release version before the build, so future releases never hit this trap again — the committed value becomes informational and the CI step is the source of truth at deploy time.
1 parent 523f634 commit b1328e1

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ jobs:
9292
-DnewVersion="${{ steps.version.outputs.version }}" \
9393
-DgenerateBackupPoms=false
9494
95+
- name: Sync skill bundle version pin to the release version
96+
# The skill launcher reads SONAR_BUNDLE_VERSION from config.env to
97+
# decide which sonar-predictor-dist-<version>.zip to fetch from
98+
# Maven Central on first invocation. If config.env is stale, an
99+
# installed plugin downloads the wrong bundle. Forcing the pin to
100+
# match the tag here removes that trap from every future release.
101+
run: |
102+
set -euo pipefail
103+
CONFIG=plugin/skills/sonar-predictor/config.env
104+
sed -i "s|^SONAR_BUNDLE_VERSION=.*|SONAR_BUNDLE_VERSION=${{ steps.version.outputs.version }}|" "${CONFIG}"
105+
grep '^SONAR_BUNDLE_VERSION' "${CONFIG}"
106+
95107
- name: Build the source bundle (whole-repo git archive of HEAD)
96108
# Built BEFORE the deploy: the release profile's build-helper plugin
97109
# attaches this zip (from the repo root) to the Maven Central upload,

plugin/skills/sonar-predictor/config.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ SONAR_MAVEN_REPO_URL=https://repo1.maven.org/maven2
2020

2121
# Bundle version. Bumped in lockstep with each plugin release. A fork can pin
2222
# to a vendored / mirrored version without touching the launcher.
23-
SONAR_BUNDLE_VERSION=0.1.1
23+
SONAR_BUNDLE_VERSION=0.1.3
2424

2525
# --- Java runtime --------------------------------------------------------------
2626

0 commit comments

Comments
 (0)