Skip to content

Commit 70683c4

Browse files
authored
fix(docs): ensure version alias is in an array to prevent "you're not viewing the latest version" incorrect message (#2629)
1 parent 19f7776 commit 70683c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/reusable_publish_docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-python/versions.json \
121121
versions_old.json
122122
jq 'del(.[].aliases[] | select(. == "${{ env.ALIAS }}"))' < versions_old.json > versions_proc.json
123-
jq '. as $o | [{"title": "${{ env.VERSION }}", "version": "${{ env.VERSION }}", "aliases": "${{env.ALIAS}}" }] as $n | $n | if .[0].title | test("[a-z]+") or any($o[].title == "${{ env.VERSION }}";.) then $o else $n + $o end' < versions_proc.json > versions.json
123+
jq '. as $o | [{"title": "${{ env.VERSION }}", "version": "${{ env.VERSION }}", "aliases": ["${{env.ALIAS}}"] }] as $n | $n | if .[0].title | test("[a-z]+") or any($o[].title == "${{ env.VERSION }}";.) then $o else $n + $o end' < versions_proc.json > versions.json
124124
aws s3 cp \
125125
versions.json \
126126
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-python/versions.json

0 commit comments

Comments
 (0)