-k DIR / kustomize build DIR: the Kustomization of DIR. */
| 1255 | |
| 1256 | /* -k DIR / kustomize build DIR: the Kustomization of DIR. */ |
| 1257 | static int sh_t_kust(sh_t *s, const char *dir, const sh_find_t *f, sh_targets_t *out) { |
| 1258 | (void)f; |
| 1259 | static const char *const names[] = {"kustomization.yaml", "kustomization.yml", "Kustomization"}; |
| 1260 | for (size_t i = 0; i < sizeof(names) / sizeof(names[0]); i++) { |
| 1261 | const char *p = cbm_arena_sprintf(s->a, "%s%s%s", dir, dir[0] ? "/" : "", names[i]); |
| 1262 | const char *key = p ? cbm_ht_get_key(s->ix->kusts, p) : NULL; |
| 1263 | if (key) { |
| 1264 | sh_targets_push(out, (int64_t)(intptr_t)cbm_ht_get(s->ix->kusts, key), dir); |
| 1265 | return SKIP_ONE; |
| 1266 | } |
| 1267 | } |
| 1268 | return 0; |
| 1269 | } |
| 1270 | |
| 1271 | /* A chart directory: its Chart. */ |
| 1272 | static int sh_t_chart(sh_t *s, const char *dir, const sh_find_t *f, sh_targets_t *out) { |
nothing calls this directly
no test coverage detected