Summary
In tools/release/publish-development-docs.sh, the S3 listing pipeline ends with || true:
aws s3 ls "s3://${VERSIONED_BUCKET_NAME}/" | grep "PRE v" | awk '{print $2}' | sed 's/\/$//' | sed 's/^v//' > s3-versions.txt || true
The script runs with set -euo pipefail. The || true is only needed so that grep returning exit 1 (no PRE v matches) does not abort the script. However, because it is attached to the whole pipeline, it also masks a failure of aws s3 ls itself (expired credentials, network error, missing permissions).
Impact
When aws s3 ls fails silently:
s3-versions.txt ends up empty.
generate-versions.js produces a versions.json with only the Development and root entries — all released versions dropped.
- The script then uploads that file over the live
s3://simpl-element-release/versions.json, breaking the version selector on the production documentation site.
Suggested fix
Split the listing from the filtering so a CLI failure aborts the script, while || true still only covers the harmless "grep found nothing" case:
aws s3 ls "s3://${VERSIONED_BUCKET_NAME}/" > s3-raw.txt
grep "PRE v" s3-raw.txt | awk '{print $2}' | sed 's/\/$//' | sed 's/^v//' > s3-versions.txt || true
rm s3-raw.txt
Notes
Summary
In
tools/release/publish-development-docs.sh, the S3 listing pipeline ends with|| true:The script runs with
set -euo pipefail. The|| trueis only needed so thatgrepreturning exit 1 (noPRE vmatches) does not abort the script. However, because it is attached to the whole pipeline, it also masks a failure ofaws s3 lsitself (expired credentials, network error, missing permissions).Impact
When
aws s3 lsfails silently:s3-versions.txtends up empty.generate-versions.jsproduces aversions.jsonwith only theDevelopmentand root entries — all released versions dropped.s3://simpl-element-release/versions.json, breaking the version selector on the production documentation site.Suggested fix
Split the listing from the filtering so a CLI failure aborts the script, while
|| truestill only covers the harmless "grep found nothing" case:Notes
tools/release/prepare-release.sh(S3 listing line) and could be fixed for consistency.