File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 11output
22schema /validate
33code-of-conduct.md
4+ version.md
Original file line number Diff line number Diff line change 1+ // +build ignore
2+
3+ package main
4+
5+ import (
6+ "fmt"
7+ "html/template"
8+ "os"
9+
10+ "github.com/opencontainers/runtime-spec/specs-go"
11+ )
12+
13+ var markdownTemplateString = `
14+
15+ **Specification Version:** *{{.}}*
16+
17+ `
18+
19+ var markdownTemplate = template .Must (template .New ("markdown" ).Parse (markdownTemplateString ))
20+
21+ func main () {
22+ if err := markdownTemplate .Execute (os .Stdout , specs .Version ); err != nil {
23+ fmt .Fprintln (os .Stderr , err )
24+ }
25+ }
Original file line number Diff line number Diff line change 22DOCKER ?= $(shell which docker)
33# These docs are in an order that determines how they show up in the PDF/HTML docs.
44DOC_FILES := \
5+ version.md \
56 README.md \
67 code-of-conduct.md \
78 principles.md \
@@ -45,6 +46,9 @@ output/docs.html: $(DOC_FILES)
4546code-of-conduct.md :
4647 curl -o $@ https://raw.githubusercontent.com/opencontainers/tob/d2f9d68c1332870e40693fe077d311e0742bc73d/code-of-conduct.md
4748
49+ version.md : ./specs-go/version.go
50+ go run ./.tool/version-doc.go > $@
51+
4852HOST_GOLANG_VERSION = $(shell go version | cut -d ' ' -f3 | cut -c 3-)
4953# this variable is used like a function. First arg is the minimum version, Second arg is the version to be checked.
5054ALLOWED_GO_VERSION = $(shell test '$(shell /bin/echo -e "$(1 ) \n$(2 ) " | sort -V | head -n1) ' == '$(1 ) ' && echo 'true')
You can’t perform that action at this time.
0 commit comments