2021-03-24 01:40:56 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-09-04 04:49:59 +08:00
|
|
|
set -eu -o pipefail
|
2021-03-24 01:40:56 +08:00
|
|
|
|
2021-09-04 04:49:59 +08:00
|
|
|
: ${BUILDX_CMD=docker buildx}
|
2021-09-09 16:29:08 +08:00
|
|
|
: ${FORMATS=md}
|
2021-03-24 01:40:56 +08:00
|
|
|
|
2021-09-04 04:49:59 +08:00
|
|
|
output=$(mktemp -d -t buildx-output.XXXXXXXXXX)
|
2021-09-09 16:29:08 +08:00
|
|
|
(set -x ; DOCS_FORMATS=$FORMATS ${BUILDX_CMD} bake --set "*.output=$output" update-docs)
|
2021-03-24 01:40:56 +08:00
|
|
|
rm -rf ./docs/reference/*
|
|
|
|
cp -R "$output"/out/* ./docs/
|
|
|
|
rm -rf $output
|