Skip to content

Commit

Permalink
Run bikeshed without updates
Browse files Browse the repository at this point in the history
Bikeshed will update its meta-data if the current version is older than 7 days.
This is a problem since it will delete our custom data that we injected in the
build process.
For now we make sure that when we run bikeshed we add the `--no-update` option
explicitly.
  • Loading branch information
thasso committed Sep 27, 2024
1 parent 9956d84 commit 522291b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build-tools/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ spec-file = $(shell find specs/$*/ -type f -iname \*.bs | head -n 1)
$(OUT)/%/index.html: $${spec-file} $${spec-sources} $(OUT)/%/Images $${spec-diagrams}
@echo "Compile $< -> $(OUT)/$*/index.html"
@[ -d $(OUT)/$* ] || mkdir -p $(OUT)/$*
@bikeshed --allow-nonlocal-files spec $< $@
@bikeshed --no-update --allow-nonlocal-files spec $< $@

.PHONY: $(OUT)/%-watch
$(OUT)/%-watch: $${spec-file} $${spec-sources} $(OUT)/%/Images
@echo "Watch $< -> $(OUT)/$*/index.html. Deps $^"
@[ -d $(OUT)/$* ] || mkdir -p $(OUT)/$*
@bikeshed --allow-nonlocal-files watch $< $(OUT)/$*/index.html
@bikeshed --no-update --allow-nonlocal-files watch $< $(OUT)/$*/index.html

# Run chromium to create a PDF from the already generated html page
$(OUT)/%.pdf: $(OUT)/$${spec-name}/index.html
Expand Down Expand Up @@ -130,7 +130,7 @@ spec.pdf: ${OUT}/${NAME}.pdf
$(OUT)/index.html: ${SRC} ${OUT}/Images $${single-spec-diagrams}
@echo "Compile $< -> $(OUT)/index.html"
@[ -d $(OUT) ] || mkdir -p $(OUT)
@bikeshed --allow-nonlocal-files spec $< $@
@bikeshed --no-update --allow-nonlocal-files spec $< $@

$(OUT)/Images: Images/
@[ -d $(OUT) ] || mkdir -p $(OUT)
Expand Down Expand Up @@ -163,12 +163,12 @@ $(OUT)/${NAME}.pdf: $(OUT)/index.html
.PHONY: spec-watch
spec-watch: ${SRC} $(OUT)/Images
@[ -d $(OUT) ] || mkdir -p $(OUT)
@bikeshed --allow-nonlocal-files watch $< $(OUT)/index.html
@bikeshed --no-update --allow-nonlocal-files watch $< $(OUT)/index.html

.PHONY: spec-serve
spec-serve: ${SRC} $(OUT)/Images
@[ -d $(OUT) ] || mkdir -p $(OUT)
@bikeshed --allow-nonlocal-files serve $< $(OUT)/index.html
@bikeshed --no-update --allow-nonlocal-files serve $< $(OUT)/index.html

# Helper to clean up
.PHONY: clean
Expand Down

0 comments on commit 522291b

Please sign in to comment.