From c5785c5c9607cedc6b6ee15f0c211cb139b234e9 Mon Sep 17 00:00:00 2001 From: Traian Captan Date: Thu, 17 Aug 2023 17:36:21 -0700 Subject: [PATCH 1/3] Added Makefile --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c18d9c0 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +SHELL=/bin/bash -o pipefail +.PHONY: local remote deploy + +remote: index.bs + @ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \ + --output index.html \ + --write-out "%{http_code}" \ + --header "Accept: text/plain, text/html" \ + -F force=1 \ + -F md-Text-Macro="COMMIT-SHA LOCAL COPY" \ + -F file=@index.bs) && \ + [[ "$$HTTP_STATUS" -eq "200" ]]) || ( \ + echo ""; cat index.html; echo ""; \ + rm -f index.html; \ + exit 22 \ + ); + +local: index.bs + bikeshed spec index.bs index.html --md-Text-Macro="COMMIT-SHA LOCAL COPY" + +deploy: index.bs + curl --remote-name --fail https://resources.whatwg.org/build/deploy.sh + bash ./deploy.sh From 86c7c6b314835851e1dd2e7059f34df9fc3e68cc Mon Sep 17 00:00:00 2001 From: Traian Captan Date: Tue, 22 Aug 2023 13:37:38 -0700 Subject: [PATCH 2/3] Changed remote make to die-on warning --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c18d9c0..8adfd85 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ remote: index.bs --output index.html \ --write-out "%{http_code}" \ --header "Accept: text/plain, text/html" \ - -F force=1 \ + -F die-on=warning \ -F md-Text-Macro="COMMIT-SHA LOCAL COPY" \ -F file=@index.bs) && \ [[ "$$HTTP_STATUS" -eq "200" ]]) || ( \ From 4e37f34a5b189867ff7d80614f6dbb6e93567c27 Mon Sep 17 00:00:00 2001 From: Traian Captan Date: Wed, 23 Aug 2023 14:54:16 -0700 Subject: [PATCH 3/3] Remove `deploy` from makefile --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 8adfd85..e8d2792 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,3 @@ remote: index.bs local: index.bs bikeshed spec index.bs index.html --md-Text-Macro="COMMIT-SHA LOCAL COPY" - -deploy: index.bs - curl --remote-name --fail https://resources.whatwg.org/build/deploy.sh - bash ./deploy.sh