|
4 | 4 | # Usage: ./scripts/release-all-plugins.sh <pluginKitVersion> |
5 | 5 | # Example: ./scripts/release-all-plugins.sh 14 |
6 | 6 | # |
7 | | -# Reads the latest tag for each plugin from git, pairs it with the given |
8 | | -# pluginKitVersion, and fires one workflow_dispatch on build-plugin.yml so all |
9 | | -# plugins build in parallel as a single matrix run. |
| 7 | +# Reads the latest tag for each plugin, bumps the patch version, and pairs the |
| 8 | +# NEW version with the given pluginKitVersion, then fires one workflow_dispatch |
| 9 | +# on build-plugin.yml so all plugins build in parallel as a single matrix run. |
| 10 | +# |
| 11 | +# An ABI bump must publish fresh binaries at a NEW release tag. Reusing the |
| 12 | +# existing tag overwrites that release's assets, which breaks the previous ABI's |
| 13 | +# consumers and serves stale copies from the GitHub release CDN. |
10 | 14 | # |
11 | 15 | # Prerequisites: gh CLI authenticated, run from repo root. |
12 | 16 |
|
@@ -59,16 +63,20 @@ for PLUGIN in "${PLUGINS[@]}"; do |
59 | 63 | done |
60 | 64 | done |
61 | 65 |
|
| 66 | +git fetch --tags --quiet origin 2>/dev/null || true |
| 67 | + |
62 | 68 | TAG_LIST="" |
63 | 69 | FIRST=true |
64 | | -echo "Resolving latest tag for each plugin:" |
| 70 | +echo "Resolving next release version for each plugin (PluginKit $PKV):" |
65 | 71 | for PLUGIN in "${PLUGINS[@]}"; do |
66 | 72 | LATEST_TAG=$(git tag -l "plugin-${PLUGIN}-v*" | sort -V | tail -1) |
67 | 73 | if [ -z "$LATEST_TAG" ]; then |
68 | 74 | echo " WARNING: No tag found for plugin-${PLUGIN}-v*. Skipping." |
69 | 75 | continue |
70 | 76 | fi |
71 | | - PAIR="${LATEST_TAG}:${PKV}" |
| 77 | + LATEST_VER="${LATEST_TAG#plugin-${PLUGIN}-v}" |
| 78 | + NEW_TAG="plugin-${PLUGIN}-v${LATEST_VER%.*}.$(( ${LATEST_VER##*.} + 1 ))" |
| 79 | + PAIR="${NEW_TAG}:${PKV}" |
72 | 80 | if [ "$FIRST" = true ]; then |
73 | 81 | TAG_LIST="$PAIR" |
74 | 82 | FIRST=false |
|
0 commit comments