mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-30 21:30:16 +00:00 
			
		
		
		
	This allows us to start building real dependencies into Makefile. Leave old hack/* scripts in place but advise to use 'make'. There are a few rules that call things like 'go run' or 'build/*' that I left as-is for now.
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| # Copyright 2014 The Kubernetes Authors.
 | |
| #
 | |
| # Licensed under the Apache License, Version 2.0 (the "License");
 | |
| # you may not use this file except in compliance with the License.
 | |
| # You may obtain a copy of the License at
 | |
| #
 | |
| #     http://www.apache.org/licenses/LICENSE-2.0
 | |
| #
 | |
| # Unless required by applicable law or agreed to in writing, software
 | |
| # distributed under the License is distributed on an "AS IS" BASIS,
 | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | |
| # See the License for the specific language governing permissions and
 | |
| # limitations under the License.
 | |
| 
 | |
| # This file is not intended to be run automatically. It is meant to be run
 | |
| # immediately before exporting docs. We do not want to check these documents in
 | |
| # by default.
 | |
| 
 | |
| set -o errexit
 | |
| set -o nounset
 | |
| set -o pipefail
 | |
| 
 | |
| KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
 | |
| source "${KUBE_ROOT}/hack/lib/init.sh"
 | |
| 
 | |
| kube::golang::setup_env
 | |
| 
 | |
| BINS=(
 | |
| 	cmd/gendocs
 | |
| 	cmd/genkubedocs
 | |
| 	cmd/genman
 | |
| 	cmd/genyaml
 | |
| 	federation/cmd/genfeddocs
 | |
| )
 | |
| make -C "${KUBE_ROOT}" WHAT="${BINS[*]}"
 | |
| 
 | |
| kube::util::ensure-temp-dir
 | |
| 
 | |
| kube::util::gen-docs "${KUBE_TEMP}"
 | |
| 
 | |
| # remove all of the old docs
 | |
| kube::util::remove-gen-docs
 | |
| 
 | |
| # Copy fresh docs into the repo.
 | |
| # the shopt is so that we get .generated_docs from the glob.
 | |
| shopt -s dotglob
 | |
| cp -af "${KUBE_TEMP}"/* "${KUBE_ROOT}"
 | |
| shopt -u dotglob
 | |
| 
 | |
| # Replace with placeholder docs
 | |
| kube::util::set-placeholder-gen-docs
 | |
| 
 | |
| echo "Generated docs have been placed in the repository tree. Running hack/update-munge-docs.sh."
 | |
| 
 | |
| "${KUBE_ROOT}/hack/update-munge-docs.sh"
 |