Skip to content

Commit 4e6f662

Browse files
authored
fix(docs): update versions.json jq query
1 parent 92f3686 commit 4e6f662

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: .github/workflows/reusable-publish-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-typescript/versions.json \
131131
versions_old.json
132132
jq 'del(.[].aliases[] | select(. == "${{ env.ALIAS }}"))' < versions_old.json > versions_proc.json
133-
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
133+
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 == $n[0].title;.) then [($o | .[] | select(.title == $n[0].title).aliases += $n[0].aliases | . )] else $n + $o end' < versions_proc.json > versions.json
134134
aws s3 cp \
135135
versions.json \
136136
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-typescript/versions.json

0 commit comments

Comments
 (0)