Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
- name: Build
run: make
- name: Deploy
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
out
/out
/venv
28 changes: 15 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ OUT_DIR ?= out

all: $(OUT_DIR)/index.html validator

$(OUT_DIR)/index.html: index.bs $(OUT_DIR)
@ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \
--output $@ \
--write-out '%{http_code}' \
--header 'Accept: text/plain, text/html' \
-F die-on=warning \
-F file=@$<) && \
[[ "$$HTTP_STATUS" -eq "200" ]]) || ( \
echo ""; cat $@; echo ""; \
rm $@; \
exit 22 \
);
venv-marker := venv/.make
bikeshed := venv/bin/bikeshed
venv: $(venv-marker)

$(venv-marker): Makefile
python3 -m venv venv
@touch $@

$(bikeshed): $(venv-marker) Makefile
venv/bin/pip install $(notdir $@)
@touch $@

$(OUT_DIR)/index.html: index.bs $(OUT_DIR) $(bikeshed)
$(bikeshed) --die-on=warning spec $< $@

validator: $(OUT_DIR)/validate-headers.html $(OUT_DIR)/validate-headers.js $(OUT_DIR)/filters.html $(OUT_DIR)/filters-main.js

Expand All @@ -34,7 +36,7 @@ ts/dist/header-validator/index.js ts/dist/header-validator/filters-main.js: ts/p
@ npm run pack --prefix ./ts

clean:
@ rm -rf $(OUT_DIR)
@ rm -rf $(OUT_DIR) venv

$(OUT_DIR)/filters.html: ts/src/header-validator/filters.html $(OUT_DIR)
@ cp $< $@
Expand Down
Loading