Skip to content

Commit

Permalink
Specs: Change spec generation for Foundation to handle _v*.md (algora…
Browse files Browse the repository at this point in the history
  • Loading branch information
jannotti authored Sep 22, 2023
1 parent 5570e88 commit 1df4388
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions data/transactions/logic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ DOCS := ../../../../docs

TEAL_opcodes.md teal.tmLanguage.json: fields_string.go ../../../cmd/opdoc/opdoc.go ../../../cmd/opdoc/tmLanguage.go eval.go assembler.go doc.go opcodes.go
go run ../../../cmd/opdoc/opdoc.go ../../../cmd/opdoc/tmLanguage.go
@cp `ls TEAL_opcodes_v??.md | tail -1` TEAL_opcodes.md
@if [ -e $(SPECS)/dev/TEAL_opcodes.md ]; then \
sed '/^$$/q' $(SPECS)/dev/TEAL_opcodes.md | cat - TEAL_opcodes.md > opcodes.spec; \
mv opcodes.spec $(SPECS)/dev/TEAL_opcodes.md; \
echo "TEAL_opcodes.md updated in specs repo"; \
fi
@if [ -e $(DOCS)/docs/reference/teal/opcodes.md ]; then \
sed 's/^# /title: /g' TEAL_opcodes.md > $(DOCS)/docs/reference/teal/opcodes.md; \
echo "opcodes.md updated in docs repo"; \
fi
@rm TEAL_opcodes.md

fields_string.go: fields.go
go generate
Expand All @@ -24,10 +22,9 @@ README.md: TEAL_opcodes.md README_in.md
python merge.py > README.md
@if [ -e $(SPECS)/dev/TEAL.md ]; then \
sed '/^$$/q' $(SPECS)/dev/TEAL.md | cat - README.md > teal.spec; \
mv teal.spec $(SPECS)/dev/TEAL.md; \
mv teal.spec $(SPECS)/dev/TEAL.md; \
echo "TEAL.md updated in specs repo"; \
fi
@if [ -e $(DOCS)/docs/reference/teal/specification.md ]; then \
sed 's/^# /title: /g' README.md > $(DOCS)/docs/reference/teal/specification.md; \
echo "specification.md updated in docs repo"; \
fi

clean:
rm -f TEAL_opcodes*.md langspec_v*.json README.md fields_string.go

0 comments on commit 1df4388

Please sign in to comment.