Skip to content

Commit

Permalink
chore: synced file(s) with honestbank/.github
Browse files Browse the repository at this point in the history
  • Loading branch information
honestbank-bot committed Jan 4, 2024
1 parent 74b6707 commit fb367bb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions catalog-info.generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if [ ! -f $META_DATA_FILE ]; then
"manual_dependencies": [],
"type": "application",
"lifecycle": "production",
"manual_service_names": [],
"example-service-name": {
"tags" : [
"language:golang",
Expand Down Expand Up @@ -54,6 +55,9 @@ squad_exist_in_team() {

REPO_NAME=$(basename "$(pwd)")
SERVICE_NAMES=(${(s: :)$(yq e '.jobs.repository-release-prod.with.helm_release_names' "$RELEASE_WORKFLOW")})
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=($REPO_NAME)
fi
Expand All @@ -62,6 +66,8 @@ SQUAD_NAME=$(yq e '.jobs.repository-release-prod.with.argocd_state_repo' "$RELEA
SQUAD_NAME=$(echo "$SQUAD_NAME" | cut -c 14-50)
if [[ -z $SQUAD_NAME || "$SQUAD_NAME" == "null" ]]; then
SQUAD_NAME=$(jq -r '.squad_name' $META_DATA_FILE)
else
SQUAD_NAME="$SQUAD_NAME-squad"
fi
GH_TEAM=""
if squad_exist_in_team "$SQUAD_NAME"; then
Expand Down Expand Up @@ -145,10 +151,10 @@ done)
spec:
type: $TYPE
lifecycle: $LIFECYCLE
owner: group:$SQUAD_NAME-squad
owner: group:$SQUAD_NAME
$(
if (( ${#DEPENDENCIES[@]} > 0 )); then
echo "dependsOn:"
echo " dependsOn:"
fi
)
$(for resource in "${DEPENDENCIES[@]}"; do
Expand All @@ -163,4 +169,3 @@ fixed_content="${file_content%$'\n'}"
echo "$fixed_content" > "$OUTPUT_FILE"

echo "File generated: $OUTPUT_FILE"

0 comments on commit fb367bb

Please sign in to comment.