Skip to content

Commit 4b546c3

Browse files
[FSSDK-12882] tagging improvementt (#344)
1 parent 4f968a3 commit 4b546c3

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎scripts/publish.sh‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@
3535
# * pre-releases (beta/alpha/rc) get their own tag, never `latest`.
3636
# * a stable release gets `latest` ONLY when it is strictly greater (by
3737
# semver) than the registry's current `latest`. Otherwise it is tagged
38-
# `v<major>.<minor>-latest` (its own release line), so `latest` never
39-
# moves backwards onto an older release — this covers both an older
40-
# major (5.x shipped after 6.x) and an older minor of the current major
41-
# (6.4.1 shipped while latest is 6.5.0).
38+
# `v<major>-last-published`, so `latest` never moves backwards onto an
39+
# older release — this covers both an older major (5.x shipped after
40+
# 6.x) and an older minor of the current major (6.4.1 shipped while
41+
# latest is 6.5.0). This tag is per-major and always points at the most
42+
# recent non-latest publish on that major line; it is not a stable
43+
# pointer to a specific version, so publishing another older version on
44+
# the same major (e.g. 6.3.5 after 6.4.1, both below latest 6.5.0) moves
45+
# the tag to the newer publish.
4246
set -euo pipefail
4347

4448
dry_run="${DRY_RUN:-false}"
@@ -120,9 +124,7 @@ case "$version" in
120124
tag=latest
121125
else
122126
major=${version%%.*}
123-
rest=${version#*.}
124-
minor=${rest%%.*}
125-
tag="v${major}.${minor}-latest"
127+
tag="v${major}-last-published"
126128
echo "Current latest is ${current_latest}; ${version} is not newer, tagging as ${tag} to preserve latest."
127129
fi
128130
;;

0 commit comments

Comments
 (0)