diff --git a/spec/LICENSE.md b/LICENSE.md similarity index 100% rename from spec/LICENSE.md rename to LICENSE.md diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..f6f726ad --- /dev/null +++ b/Makefile @@ -0,0 +1,75 @@ +# Build all documents and diagrams from spec/ into the build/ +# output folder. Please read RELEASE.md for more details on +# publishing the documents. +# +# Assumes python3 is installed +# Assumes npm is installed +# +# Examples of usage: +# make all +# make a clean build +# make build +# build the documents and diagrams +# make clean +# clean the build directory +# make install +# Will install bikeshed and mermaid-cli globally + +# spec/**.mmd -> build/**.svg +DIAGRAMS := $(wildcard spec/v2/diagrams/*.mmd) +DIAGRAMS := $(DIAGRAMS:spec/%.mmd=build/%.svg) +SOURCES := $(wildcard **.bs) + +# Build rule for bikeshed documents +build/%.html: spec/%.bs + @echo Check release status and version + $(eval status := $(shell sed -n 's/^Text Macro: STATUS //p' $<)) + $(eval version := $(shell sed -n 's/^Text Macro: VERSION //p' $<)) + $(eval date := $(shell sed -n 's/^Text Macro: DATE //p' $<)) + + @echo Build the document + mkdir -p $(dir $@) + bikeshed --allow-nonlocal-files spec $< $@ + + @echo Set the status in the document + @if [[ "$(status)" == "Release" ]]; then \ + echo "Release: add version to title"; \ + mv -f $@ $@.tmp; \ + sed 's/
-Title: Technical Specifications for PCF Data Exchange +Text Macro: DATE 20230201 Text Macro: VERSION 1.0.1 -Shortname: data-exchange-protocol +Text Macro: STATUS Release +Title: Technical Specifications for PCF Data Exchange Level: 1 Status: LD +Shortname: data-exchange-protocol TR: https://wbcsd.github.io/tr/2023/data-exchange-protocol-20230201/ Mailing List: pact@wbcsd.org Editor: @@ -1384,5 +1386,5 @@ highlight: json # Appendix A: License # {#license}-path: LICENSE.md +path: ../LICENSE.mddiff --git a/spec/v2/index.bs b/spec/v2/index.bs index fc0b5615..1fa1f66d 100644 --- a/spec/v2/index.bs +++ b/spec/v2/index.bs @@ -1,9 +1,23 @@ +-Title: Technical Specifications for PCF Data Exchange +Text Macro: DATE 20241024 Text Macro: VERSION 2.3.0 -Shortname: data-exchange-protocol +Text Macro: STATUS Draft +Title: Technical Specifications for PCF Data Exchange +TR: https://wbcsd.github.io/tr/2024/data-exchange-protocol-20241024/ +Previous Version: https://wbcsd.github.io/tr/2024/data-exchange-protocol-20240410/ Level: 1 Status: LD +Shortname: data-exchange-protocol Mailing List: pact@wbcsd.org Editor: Gertjan Schuurmans (WBCSD), https://www.wbcsd.org, schuurmans@wbcsd.org Former Editor: Beth Hadley (WBCSD), https://www.wbcsd.org, hadley@wbcsd.org @@ -14,7 +28,6 @@ Abstract: This document specifies a data model for GHG emission data at product Markup Shorthands: markdown yes, idl yes, dfn yes Boilerplate: omit copyright, omit conformance Local Boilerplate: header yes -Local Boilerplate: computed-metadata yes Metadata Include: This version off@@ -2792,7 +2805,7 @@ highlight: json # Appendix A: License # {#license}-path: LICENSE.md +path: ../../LICENSE.md# Appendix B: Changelog # {#changelog}