|
34 | 34 | # - Computes the dist-tag from the version: |
35 | 35 | # * pre-releases (beta/alpha/rc) get their own tag, never `latest`. |
36 | 36 | # * a stable release gets `latest` ONLY when it is strictly greater (by |
37 | | -# semver) than the registry's current `latest`. Otherwise it is tagged |
38 | | -# `v<major>-latest` (the JS SDK's long-standing per-major release line, |
39 | | -# which consumers install via @<pkg>@v<major>-latest), so `latest` never |
40 | | -# moves backwards onto an older release — e.g. 5.x shipped after 6.x, or |
41 | | -# a 6.4.1 patch shipped while latest is 6.5.0. |
| 37 | +# semver) than the registry's current `latest`, so `latest` never moves |
| 38 | +# backwards onto an older release — e.g. 5.x shipped after 6.x, or a |
| 39 | +# 6.4.1 patch shipped while latest is 6.5.0. Otherwise it is tagged |
| 40 | +# `v<major>-last-published`: a per-major pointer to the most recently |
| 41 | +# published version on that major line. It is named for recency (not |
| 42 | +# "latest") on purpose — an out-of-order backport can leave it below the |
| 43 | +# highest version in the major. Consumers install a line via |
| 44 | +# @<pkg>@v<major>-last-published. |
42 | 45 | set -euo pipefail |
43 | 46 |
|
44 | 47 | dry_run="${DRY_RUN:-false}" |
@@ -120,8 +123,8 @@ case "$version" in |
120 | 123 | tag=latest |
121 | 124 | else |
122 | 125 | major=${version%%.*} |
123 | | - tag="v${major}-latest" |
124 | | - echo "Current latest is ${current_latest}; ${version} is not newer, tagging as ${tag} to preserve latest." |
| 126 | + tag="v${major}-last-published" |
| 127 | + echo "Current latest is ${current_latest}; ${version} is not newer, tagging as ${tag} (latest preserved)." |
125 | 128 | fi |
126 | 129 | ;; |
127 | 130 | esac |
|
0 commit comments