mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
16 lines
877 B
Bash
Executable File
16 lines
877 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Users may configure custom resource icons in resource_customizations. This script generates a list of those icons so
|
|
# that the UI knows which icons are available.
|
|
|
|
{
|
|
echo "// Code generated by hack/generate-icons-typescript.sh; DO NOT EDIT.";
|
|
echo "/* eslint-disable prettier/prettier */";
|
|
echo "";
|
|
echo "// resourceIconGroups is a map of resource kind globs to whether or not a custom icon exists for that kind.";
|
|
echo "// Each glob corresponds to a directory under ui/src/assets/images/resources, where any asterisk is represented as an underscore (_).";
|
|
echo "export const resourceIconGroups = {";
|
|
find ui/src/assets/images/resources -name icon.svg | sort | sed "s/ui\/src\/assets\/images\/resources\// '/" | sed "s/\/icon.svg/': true,/" | sed 's/_/*/';
|
|
echo "};";
|
|
} > ui/src/app/applications/components/resource-customizations.ts
|