File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 2323
2424 SAVE ARTIFACT signed_doc.json
2525
26+ GEN_JSON :
27+ FUNCTION
28+ ARG output= ../signed_doc.json
29+ RUN cd definitions; \
30+ cue vet -Evc -s ./signed_docs/docs:signed_docs && \
31+ cue export -f -s ./signed_docs/docs:signed_docs --out json | jq -S > $output
32+
33+
2634# Regenerate the json spec file.
2735regenerate-json :
2836 FROM +src
37+
2938 # Make sure keys are sorted so its both reproducible, AND diffs easily.
30- RUN cd definitions; \
31- cue vet -Evc -s ./signed_docs/docs:signed_docs && \
32- cue export -f -s ./signed_docs/docs:signed_docs --out json | jq -S > ../signed_doc.json
39+ DO +GEN_JSON
3340
3441 SAVE ARTIFACT --keep-ts signed_doc.json
3542
@@ -64,8 +71,13 @@ check:
6471 RUN cue fmt --check -s --files ./definitions
6572 # RUN cd definitions; \
6673 # cue vet ./cddl
67- RUN cd definitions; \
68- cue vet ./signed_docs/docs:signed_docs ../signed_doc.json
74+
75+ # This does not work anymore. Looks like a bug in the validator.
76+ # so regenerate and compare the output.
77+ # RUN cd definitions; \
78+ # cue vet ./signed_docs/docs:signed_docs ../signed_doc.json
79+ DO +GEN_JSON --output = ../signed_doc.check.json
80+ RUN diff signed_doc.json signed_doc.check.json
6981
7082 # Get the current docs
7183 COPY --keep-ts docs+generated-pages/signed_doc /docs
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ regenerate:
3434# Validate the generated signed_docs.json is correct against the cue schema.
3535validate :
3636 # Generate the intermediate compiled schema data.
37- cd definitions; CUE_EXPERIMENT=evalv3=0 cue vet ./ signed_docs/ docs:signed_docs ../ signed_doc.json
37+ cd definitions; cue vet ./ signed_docs/ docs:signed_docs ../ signed_doc.json
3838 # cd definitions; cue vet ./signed_docs/docs:signed_docs ../signed_doc.json
3939 # Check the Model is valid.
4040 cd generators; uv run validator ../ signed_doc.json
You can’t perform that action at this time.
0 commit comments