Skip to content

Commit ad7f243

Browse files
authored
fix(docs): fix local builds with earthly and Just (#500)
* fix(docs): fix local builds with earthly and Just * fix(docs): Remove CDDL from checks until we actually have it
1 parent b4ee917 commit ad7f243

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

specs/Earthfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,21 @@ src:
2323

2424
SAVE ARTIFACT signed_doc.json
2525

26+
# Regenerate the json spec file.
27+
regenerate-json:
28+
FROM +src
29+
# Make sure keys are sorted so its both reproducible, AND diffs easily.
30+
RUN cd definitions; \
31+
cue export -f -s ./signed_docs/docs:signed_docs --out json | jq -S > ../signed_doc.json
32+
33+
SAVE ARTIFACT --keep-ts signed_doc.json
34+
2635
# Regenerate the full signed document specification json file.
2736
regenerate:
2837
FROM +src
2938

39+
COPY +regenerate-json/signed_doc.json .
40+
3041
# Make sure keys are sorted so its both reproducible, AND diffs easily.
3142
RUN cd definitions; \
3243
cue export -f -s ./signed_docs/docs:signed_docs --out json | jq -S > ../signed_doc.json
@@ -37,6 +48,12 @@ regenerate:
3748
SAVE ARTIFACT --keep-ts signed_doc.json
3849
SAVE ARTIFACT --keep-ts ../gen gen
3950

51+
regenerate-local-json:
52+
FROM +regenerate-json
53+
54+
SAVE ARTIFACT signed_doc.json AS LOCAL signed_doc.json
55+
56+
4057
regenerate-local:
4158
FROM +regenerate
4259

@@ -48,6 +65,8 @@ regenerate-local:
4865
check:
4966
FROM +src
5067
RUN cue fmt --check -s --files ./definitions
68+
# RUN cd definitions; \
69+
# cue vet ./cddl
5170
RUN cd definitions; \
5271
cue vet ./signed_docs/docs:signed_docs ../signed_doc.json
5372

specs/Justfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Developer convenience functions
44

55
# required to get cuelang to enable file embedding
6-
export CUE_EXPERIMENT := "embed"
6+
export CUE_EXPERIMENT := "evalv3=0"
77
default:
88
@just --list --unsorted
99

@@ -19,16 +19,14 @@ format:
1919

2020
# Check the signed document cue files are valid.
2121
check: format
22-
cd definitions; cue vet ./signed_docs/docs:signed_docs -c
23-
cd definitions; cue vet ./form_template/elements:form_template -c
22+
earthly +check
2423

2524
# Regenerate the full signed document specification json file.
2625
regenerate-signed-doc-json:
27-
# Make sure keys are sorted so its both reproducible, AND diffs easily.
28-
cd definitions; cue export -f -s ./signed_docs/docs:signed_docs --out json | jq -S > ../signed_doc.json
26+
earthly +regenerate-local-json
2927

3028
# Fix and Check Markdown files
31-
regenerate: check regenerate-signed-doc-json validate && validate-docs
29+
regenerate:
3230
earthly +regenerate-local
3331
rm -rf "../docs/src/architecture/08_concepts/signed_doc"
3432
mv temp_gen "../docs/src/architecture/08_concepts/signed_doc"

0 commit comments

Comments
 (0)