From de1b485bce4b57898f8239927b2f5ba01d7e3171 Mon Sep 17 00:00:00 2001 From: Honest Bot Date: Wed, 13 Nov 2024 07:20:33 +0000 Subject: [PATCH] chore: synced file(s) with honestbank/.github --- .pre-commit-config.yaml | 6 +++--- catalog-info.generator.sh | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6a413b..67cf94c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ default_install_hook_types: [ pre-commit, commit-msg ] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: end-of-file-fixer stages: [commit] @@ -18,7 +18,7 @@ repos: stages: [commit] args: ["--allow-missing-credentials"] - repo: https://github.com/golangci/golangci-lint - rev: v1.60.3 + rev: v1.61.0 hooks: - id: golangci-lint stages: [commit] @@ -29,7 +29,7 @@ repos: - id: go-imports stages: [commit] - repo: https://github.com/gitguardian/ggshield - rev: v1.31.0 + rev: v1.32.1 hooks: - id: ggshield language: python diff --git a/catalog-info.generator.sh b/catalog-info.generator.sh index 30f8da4..6e8da37 100755 --- a/catalog-info.generator.sh +++ b/catalog-info.generator.sh @@ -75,6 +75,15 @@ fi if [[ ${#SERVICE_NAMES[@]} == 0 || "$SERVICE_NAMES" == "null" ]]; then SERVICE_NAMES=(${(s: :)$(jq -r ".manual_service_names[]" $META_DATA_FILE)}) fi +if [[ ${#SERVICE_NAMES[@]} == 0 || "$SERVICE_NAMES" == "null" ]]; then + SERVICE_NAMES=($(jq --arg p "$REPO_NAME" -r 'to_entries | .[] | .value as $version | ($version | split(".")[0] | tonumber) as $major | + if $major >= 2 then + "\($p)-\(.key)-v\($major)" + else + "\($p)-\(.key)" + end' .release-please-manifest.json)) + SERVICE_NAMES+=($REPO_NAME) +fi if [[ ${#SERVICE_NAMES[@]} == 0 || "$SERVICE_NAMES" == "null" ]]; then SERVICE_NAMES=($REPO_NAME) fi @@ -121,6 +130,8 @@ for SERVICE in $SERVICE_NAMES; do SERVICE_RUNBOOK=$(jq -r ".\"$SERVICE\".runbook" $META_DATA_FILE) # Default dependencies DEPENDENCIES=(${(s: :)$(jq -r ".manual_dependencies[]" $META_DATA_FILE)}) + # Service specific dependencies + DEPENDENCIES+=(${(s: :)$(jq -r ".\"$SERVICE\".manual_dependencies[]?" $META_DATA_FILE)}) TOPICS=(${(s: :)$(grep Topic "config/config.go" | sed -n 's/.*default:"\([^"]*\)".*/\1/p')}) for topic in $TOPICS; do DEPENDENCIES+=("resource:confluent-$topic")