add: devops scripts and configs
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Generate Go resources and documentation from unified YAML.
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="${ROOT_DIR:-$(cd "${SCRIPT_DIR}/.." && pwd)}"
|
||||
PROVIDER_DIR="${ROOT_DIR}/universal_rebuild"
|
||||
DOCS_DIR="${ROOT_DIR}/docs/30_registry/resources"
|
||||
|
||||
cd "$PROVIDER_DIR"
|
||||
|
||||
# Remove old generated resources (keep core files).
|
||||
rm -f "${PROVIDER_DIR}/internal/resources_gen"/*_resource.go
|
||||
rm -f "${PROVIDER_DIR}/internal/resources_gen/registry.go"
|
||||
|
||||
# Step 1: generate Go resources from unified YAML.
|
||||
echo "Generating Go resources from unified YAML..."
|
||||
go run ./tools/gen_v2
|
||||
|
||||
# Step 2: generate documentation from unified YAML (new template).
|
||||
echo "Generating documentation using new template generator..."
|
||||
"${ROOT_DIR}/devops/02_generate_resources_and_docs_template_v2.sh"
|
||||
|
||||
echo "Done. Docs updated in ${DOCS_DIR}"
|
||||
Reference in New Issue
Block a user