Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate deadline and pass to bikeshed as metadata #1795

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

dschuff
Copy link
Member

@dschuff dschuff commented Aug 31, 2024

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.

@@ -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 python3 ../deadline.py)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could more simply use the date utility; unfortunately the GNU and BSD date utilities are approximately 0% compatible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date -d "+30 days" +%Y-%m-%d 2>/dev/null || date -v +30d +%Y-%m-%d

…should work — if we want to avoid needing to add the python script

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, shouldn't it work to inline the Python command?

Suggested change
DEADLINE = $(shell python3 ../deadline.py)
DEADLINE = $(shell python3 -c "import datetime; print(datetime.date.today() + datetime.timedelta(days=30))")

But even better if we can avoid a one-off Python dependency altogether.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I didn't think of just trying both GNU and BSD arguments; that's simple enough for me.
And yes, I also thought of inlining the Python command, it was just a question of whether it was better to duplicate it in all 3 of the Makefiles or keep it in one place. I don't have a strong opinion on that, other than to note that the Python dependency is hardly one-off; we already have plenty of Python in the W3C build flow, including Bikeshed itself.

@@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Deadline metadata field could be added to the metadata block at the top of index.bs as well (it would have to be an arbitrary date or now); I decided not to do that, with the consequence that the CR/CRD will fail to build if --md-deadline is not specified on the command line. This seemed OK, it just means nobody can "accidentally" make a CR. The ED/WD forms are not affected.

@@ -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 python3 ../deadline.py)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, shouldn't it work to inline the Python command?

Suggested change
DEADLINE = $(shell python3 ../deadline.py)
DEADLINE = $(shell python3 -c "import datetime; print(datetime.date.today() + datetime.timedelta(days=30))")

But even better if we can avoid a one-off Python dependency altogether.

@dschuff dschuff merged commit 1726692 into WebAssembly:main Sep 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants