mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
chore: move cli data files to data subdir
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
@@ -15,19 +15,19 @@ main() {
|
||||
trap "GIT_DIR=\"$cli_source\" git worktree remove \"$worktree_dir\" --force 2>/dev/null || true" EXIT
|
||||
|
||||
(set -e; cd "$worktree_dir"; make -f docker.Makefile yamldocs || { printf "::error::Failed to generate YAML docs!\n"; exit 1; }) || return $?
|
||||
cp "$worktree_dir"/docs/yaml/*.yaml ./data/engine-cli/
|
||||
cp "$worktree_dir"/docs/yaml/*.yaml ./data/cli/engine/
|
||||
|
||||
if git diff --quiet "./data/engine-cli/*.yaml"; then
|
||||
if git diff --quiet "./data/cli/engine/*.yaml"; then
|
||||
printf "\e[32m✅ Already up to date\e[0m\n"
|
||||
return 100
|
||||
fi
|
||||
|
||||
echo -e "ℹ️ Changes detected:"
|
||||
git diff --stat "./data/engine-cli/*.yaml" || true
|
||||
git diff --stat "./data/cli/engine/*.yaml" || true
|
||||
|
||||
NICE_GIT_REF=$(cd "$worktree_dir" && git describe --always --dirty) || return $?
|
||||
|
||||
git add "./data/engine-cli/*.yaml"
|
||||
git add "./data/cli/engine/*.yaml"
|
||||
|
||||
git commit -m "cli: sync docs with docker/cli $NICE_GIT_REF"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user