github.com/argoproj/argo-events@v1.9.1/hack/update-api-docs.sh (about) 1 #!/bin/bash 2 3 set -o errexit 4 set -o nounset 5 set -o pipefail 6 7 # Setup at https://github.com/ahmetb/gen-crd-api-reference-docs 8 9 source $(dirname $0)/library.sh 10 header "updating api docs" 11 12 ensure_pandoc 13 ensure_vendor 14 make_fake_paths 15 16 export GOPATH="${FAKE_GOPATH}" 17 export GO111MODULE="off" 18 19 cd "${FAKE_REPOPATH}" 20 21 # Event Source 22 go run ${FAKE_REPOPATH}/vendor/github.com/ahmetb/gen-crd-api-reference-docs/main.go \ 23 -config "${FAKE_REPOPATH}/vendor/github.com/ahmetb/gen-crd-api-reference-docs/example-config.json" \ 24 -api-dir "github.com/argoproj/argo-events/pkg/apis/eventsource/v1alpha1" \ 25 -out-file "${FAKE_REPOPATH}/api/event-source.html" \ 26 -template-dir "${FAKE_REPOPATH}/hack/api-docs-template" 27 28 # Sensor 29 go run ${FAKE_REPOPATH}/vendor/github.com/ahmetb/gen-crd-api-reference-docs/main.go \ 30 -config "${FAKE_REPOPATH}/vendor/github.com/ahmetb/gen-crd-api-reference-docs/example-config.json" \ 31 -api-dir "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" \ 32 -out-file "${FAKE_REPOPATH}/api/sensor.html" \ 33 -template-dir "${FAKE_REPOPATH}/hack/api-docs-template" 34 35 # EventBus 36 go run ${FAKE_REPOPATH}/vendor/github.com/ahmetb/gen-crd-api-reference-docs/main.go \ 37 -config "${FAKE_REPOPATH}/vendor/github.com/ahmetb/gen-crd-api-reference-docs/example-config.json" \ 38 -api-dir "github.com/argoproj/argo-events/pkg/apis/eventbus/v1alpha1" \ 39 -out-file "${FAKE_REPOPATH}/api/event-bus.html" \ 40 -template-dir "${FAKE_REPOPATH}/hack/api-docs-template" 41 42 # Setup at https://pandoc.org/installing.html 43 44 pandoc --from markdown --to gfm ${FAKE_REPOPATH}/api/event-source.html > ${FAKE_REPOPATH}/api/event-source.md 45 pandoc --from markdown --to gfm ${FAKE_REPOPATH}/api/sensor.html > ${FAKE_REPOPATH}/api/sensor.md 46 pandoc --from markdown --to gfm ${FAKE_REPOPATH}/api/event-bus.html > ${FAKE_REPOPATH}/api/event-bus.md 47