File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 11output
22schema /validate
3+ 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 \
@@ -20,7 +21,7 @@ EPOCH_TEST_COMMIT := 041eb73d2e0391463894c04c8ac938036143eba3
2021docs : pdf html
2122.PHONY : docs
2223
23- pdf :
24+ pdf : $( DOC_FILES )
2425 @mkdir -p output/ && \
2526 $(DOCKER ) run \
2627 -it \
3132 vbatts/pandoc -f markdown_github -t latex -o /output/docs.pdf $(patsubst % ,/input/% ,$(DOC_FILES ) ) && \
3233 ls -sh $(shell readlink -f output/docs.pdf)
3334
34- html :
35+ html : $( DOC_FILES )
3536 @mkdir -p output/ && \
3637 $(DOCKER ) run \
3738 -it \
4344 ls -sh $(shell readlink -f output/docs.html)
4445
4546
47+ version.md : ./specs-go/version.go
48+ go run ./.tool/version-doc.go > $@
49+
4650HOST_GOLANG_VERSION = $(shell go version | cut -d ' ' -f3 | cut -c 3-)
4751# this variable is used like a function. First arg is the minimum version, Second arg is the version to be checked.
4852ALLOWED_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