feat: add directory-scoped host defaults (match_dirs) and repo list --limit
Some checks are pending
CI / lint (push) Waiting to run
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / functional (push) Blocked by required conditions

Add match_dirs field to host config entries for directory-based host
resolution. When no --hostname flag, FGJ_HOST env var, or git remote is
detected, the longest matching directory prefix determines the host.
Symlinks are resolved on both sides for macOS compatibility (/tmp →
/private/tmp). Also adds --limit/-L flag to repo list.
This commit is contained in:
sid 2026-03-23 12:39:51 -06:00
parent 113505de95
commit c293e233d2
17 changed files with 252 additions and 79 deletions

View file

@ -180,7 +180,7 @@ func runReleaseList(cmd *cobra.Command, args []string) error {
return err
}
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost())
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost(), getCwd())
if err != nil {
return err
}
@ -251,7 +251,7 @@ func runReleaseView(cmd *cobra.Command, args []string) error {
return err
}
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost())
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost(), getCwd())
if err != nil {
return err
}
@ -363,7 +363,7 @@ func runReleaseCreate(cmd *cobra.Command, args []string) error {
return err
}
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost())
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost(), getCwd())
if err != nil {
return err
}
@ -420,7 +420,7 @@ func runReleaseUpload(cmd *cobra.Command, args []string) error {
return err
}
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost())
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost(), getCwd())
if err != nil {
return err
}
@ -460,7 +460,7 @@ func runReleaseDownload(cmd *cobra.Command, args []string) error {
return err
}
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost())
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost(), getCwd())
if err != nil {
return err
}
@ -547,7 +547,7 @@ func runReleaseDelete(cmd *cobra.Command, args []string) error {
return err
}
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost())
client, err := api.NewClientFromConfig(cfg, "", getDetectedHost(), getCwd())
if err != nil {
return err
}