fix: architectural improvements per Opus analysis
1. Version sync: provider/main.go = profile.env = 5.0.60 2. docs-generator: removed detectVersion() — no more dependency on provider/ 3. docs-generator: removed detectRoot(), pickPath() — all paths via flags/env 4. docs-generator: require --version, --resources, --docs flags 5. Auto-rebuild: yaml-generator rebuilds if sources newer than binary 6. Three version vars → one VERSION in profile.env 7. Created TOOLS/lib/ — shared YAML contract types (not yet integrated)
This commit is contained in:
@@ -137,10 +137,12 @@ fi
|
||||
|
||||
rm -f "$FAILURES_FILE"
|
||||
|
||||
# Build service_spec_gen binary if missing.
|
||||
if [[ ! -x "${ROOT_DIR}/TOOLS/bin/yaml-generator" ]]; then
|
||||
echo "Building service_spec_gen..."
|
||||
# Binary pre-built in TOOLS/bin/yaml-generator
|
||||
# Auto-rebuild yaml-generator if sources are newer than binary
|
||||
BIN="${ROOT_DIR}/TOOLS/bin/yaml-generator"
|
||||
SRC="${ROOT_DIR}/TOOLS/yaml-generator/"
|
||||
if [[ ! -x "$BIN" ]] || [[ "$SRC" -nt "$BIN" ]]; then
|
||||
echo "Building yaml-generator..."
|
||||
(cd "${ROOT_DIR}/TOOLS/yaml-generator" && go build -o "$BIN" .)
|
||||
fi
|
||||
|
||||
# Проверка что список сервисов не пустой
|
||||
|
||||
@@ -100,7 +100,7 @@ load_s3cfg_registry() {
|
||||
|
||||
VERSION="${1:-}"
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
VERSION="${PROVIDER_VERSION:-${RELEASE_VERSION:-}}"
|
||||
VERSION="${VERSION:-}"
|
||||
fi
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
VERSION=$(grep -E 'version string' "$PROVIDER_MAIN" | sed -E 's/.*"([0-9.]+)".*/\1/')
|
||||
|
||||
@@ -52,7 +52,7 @@ resolve_root_path() {
|
||||
|
||||
VERSION="${1:-}"
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
VERSION="${DOCS_VERSION:-${RELEASE_VERSION:-}}"
|
||||
VERSION="${VERSION:-}"
|
||||
fi
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
VERSION=$(grep -E 'version string' "$PROVIDER_MAIN" | sed -E 's/.*"([0-9.]+)".*/\1/')
|
||||
|
||||
Reference in New Issue
Block a user