From d01dbcd135e54e82334e25c774989d13e6a7a987 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Tue, 28 Jun 2022 12:59:13 -0700 Subject: [PATCH] remove add-git-head-to-bikeshed-header.sh (partial revert of #2856) I accidentally broke this for WGSL because the sed invocation is not the same for both. This merges it back into the Makefiles, but still suppresses the console output from make. --- spec/Makefile | 4 +++- tools/add-git-head-to-bikeshed-header.sh | 11 ----------- wgsl/Makefile | 4 +++- 3 files changed, 6 insertions(+), 13 deletions(-) delete mode 100755 tools/add-git-head-to-bikeshed-header.sh diff --git a/spec/Makefile b/spec/Makefile index ed7ffc71f1..d0602828f6 100644 --- a/spec/Makefile +++ b/spec/Makefile @@ -8,8 +8,10 @@ clean: index.pre.html: *.bs DIE_ON=everything bash ../tools/invoke-bikeshed.sh index.pre.html *.bs +GHC=https://github.com/gpuweb/gpuweb/blob index.html: index.pre.html - bash ../tools/add-git-head-to-bikeshed-header.sh index.pre.html > index.html + @echo 'Inserting source permalink: index.pre.html -> index.html' + @sed -e "s,gpuweb.github.io/gpuweb/,gpuweb.github.io/gpuweb/
$(GHC)/$(shell git rev-parse HEAD)/spec/index.bs," index.html webgpu.idl: index.html ../tools/extract-idl-index.py python3 ../tools/extract-idl-index.py index.html > webgpu.idl diff --git a/tools/add-git-head-to-bikeshed-header.sh b/tools/add-git-head-to-bikeshed-header.sh deleted file mode 100755 index b785059fc6..0000000000 --- a/tools/add-git-head-to-bikeshed-header.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# Append another line to the "This version:" metadata at the top. - -if [ $# -ne 1 ] ; then - echo "Usage: $0 index.pre.html > index.html" - exit 1 -fi - -ghc="https://github.com/gpuweb/gpuweb/blob" -head=$(git rev-parse HEAD) -sed -e "s,gpuweb.github.io/gpuweb/,gpuweb.github.io/gpuweb/
$ghc/$head/spec/index.bs," "$1" diff --git a/wgsl/Makefile b/wgsl/Makefile index 2bcebdd491..f09cdb37cb 100644 --- a/wgsl/Makefile +++ b/wgsl/Makefile @@ -11,8 +11,10 @@ clean: index.pre.html: index.bs DIE_ON=everything bash ../tools/invoke-bikeshed.sh index.pre.html index.bs +GHC=https://github.com/gpuweb/gpuweb/blob index.html: index.pre.html - bash ../tools/add-git-head-to-bikeshed-header.sh index.pre.html > index.html + @echo 'Inserting source permalink: index.pre.html -> index.html' + @sed -e "s,gpuweb/wgsl/,gpuweb/wgsl/
$(GHC)/$(shell git rev-parse HEAD)/wgsl/index.bs," index.html # Extract WGSL grammar from the spec, validate it with Treesitter, # and use Treesitter to parse many code examples in the spec.