Skip to content

Commit

Permalink
Generate deadline and pass to bikeshed as metadata (#1795)
Browse files Browse the repository at this point in the history
The Makefiles now generate a date 30 days in the future, and pass this date to bikeshed as
the standard 'Deadline' metadata.

Along with speced/bikeshed-boilerplate#98, this causes the document
status section to generate with a transition deadline always 30 from the generation time.
  • Loading branch information
dschuff authored Sep 3, 2024
1 parent 1c238ab commit 1726692
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion document/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ DOWNLOADDIR = _download
NAME = WebAssembly
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2024/WG-06-12.md
TAR = tar
DEADLINE = $(shell date -d "+30 days" +%Y-%m-%d 2>/dev/null || date -v +30d +%Y-%m-%d)

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
Expand Down Expand Up @@ -155,7 +156,7 @@ bikeshed: $(GENERATED)
@echo
@echo =========================================================================
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
bikeshed spec --md-status=$(W3C_STATUS) index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
bikeshed spec --md-status=$(W3C_STATUS) --md-deadline=$(DEADLINE) index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
mkdir -p $(BUILDDIR)/html/bikeshed/
(cd util/katex/ && yarn && yarn build && npm install --only=prod)
python3 util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
Expand Down
7 changes: 4 additions & 3 deletions document/js-api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ DOWNLOADDIR = _download
NAME = WebAssembly
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2024/WG-06-12.md
TAR = tar
DEADLINE = $(shell date -d "+30 days" +%Y-%m-%d 2>/dev/null || date -v +30d +%Y-%m-%d)

.PHONY: all
all:
mkdir -p $(BUILDDIR)/html
bikeshed spec --md-status=$(W3C_STATUS) index.bs $(BUILDDIR)/html/index.html
bikeshed spec --md-status=$(W3C_STATUS) --md-deadline=$(DEADLINE) index.bs $(BUILDDIR)/html/index.html
@echo "Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html."

.PHONY: publish
Expand All @@ -34,7 +35,7 @@ diff: all
# macOS tar has no “--transform” option (only GNU tar does), so on macOS,
# do “brew install tar” & run “make” like this: “TAR=gtar make -e WD-tar”
WD-tar: all
bikeshed spec --md-status=$(W3C_STATUS) index.bs $(BUILDDIR)/html/index.html
bikeshed spec --md-status=$(W3C_STATUS) --md-deadline=$(DEADLINE) index.bs $(BUILDDIR)/html/index.html
$(TAR) -C $(BUILDDIR)/html --transform="s/index.html/Overview.html/" -cf $(BUILDDIR)/WD.tar index.html
@echo "Built $(BUILDDIR)/WD.tar."

Expand Down Expand Up @@ -63,4 +64,4 @@ WD-echidna-CI: WD-tar
-F "token=$(W3C_ECHIDNA_TOKEN_JSAPI)" \
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
@echo
@echo "Published w$(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
5 changes: 3 additions & 2 deletions document/web-api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ DOWNLOADDIR = _download
NAME = WebAssembly
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2024/WG-06-12.md
TAR = tar
DEADLINE = $(shell date -d "+30 days" +%Y-%m-%d 2>/dev/null || date -v +30d +%Y-%m-%d)

.PHONY: all
all:
mkdir -p $(BUILDDIR)/html
bikeshed spec --md-status=$(W3C_STATUS) index.bs $(BUILDDIR)/html/index.html
bikeshed spec --md-status=$(W3C_STATUS) --md-deadline=$(DEADLINE) index.bs $(BUILDDIR)/html/index.html
@echo "Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html."

.PHONY: publish
Expand All @@ -34,7 +35,7 @@ diff: all
# macOS tar has no “--transform” option (only GNU tar does), so on macOS,
# do “brew install tar” & run “make” like this: “TAR=gtar make -e WD-tar”
WD-tar: all
bikeshed spec --md-status=$(W3C_STATUS) index.bs $(BUILDDIR)/html/index.html
bikeshed spec --md-status=$(W3C_STATUS) --md-deadline=$(DEADLINE) index.bs $(BUILDDIR)/html/index.html
$(TAR) -C $(BUILDDIR)/html --transform="s/index.html/Overview.html/" -cf $(BUILDDIR)/WD.tar index.html
@echo "Built $(BUILDDIR)/WD.tar."

Expand Down

0 comments on commit 1726692

Please sign in to comment.