Documentation
¶
Index ¶
- Constants
- func CachedSettings() (*settings.EntireSettings, error)
- func DeploymentDisabled(config map[string]any) bool
- func InitSettings(ctx context.Context) error
- func LoadIn(root *os.Root, name string) (map[string]any, bool, error)
- func Marshal(config map[string]any) ([]byte, error)
- func MaybeMergeMetadataBranchConfig(repo *git.Repository, rootTreeHash plumbing.Hash) (plumbing.Hash, error)
- func MergeDeploymentDisabled(config map[string]any)
- func ResetSettingsCache()
Constants ¶
const ( BranchPattern = "entire/**" FileName = "vercel.json" )
Variables ¶
This section is empty.
Functions ¶
func CachedSettings ¶
func CachedSettings() (*settings.EntireSettings, error)
CachedSettings returns the most recently initialized repository settings.
func DeploymentDisabled ¶
DeploymentDisabled reports whether Entire branches are disabled in the config.
func InitSettings ¶
InitSettings loads repository settings for the current command context and stores them in a small package cache.
func LoadIn ¶ added in v0.10.6
LoadIn reads the Vercel config file named inside root, if present.
Through the worktree's root rather than a path joined onto the repo root: vercel.json is a working-tree file, so it arrives by clone. A link leaving the worktree is refused, which is the property the worktreedir anchor exists to give.
Following an in-repo link is the CALLER's job, and it has to be: os.Root refuses an absolute symlink target even when it resolves inside the root, so name is expected to be one the caller already resolved (see setup.go's worktreeFileName). Passing the raw file name still works for the ordinary case of a real file or a relative link.
func MaybeMergeMetadataBranchConfig ¶
func MaybeMergeMetadataBranchConfig(repo *git.Repository, rootTreeHash plumbing.Hash) (plumbing.Hash, error)
MaybeMergeMetadataBranchConfig ensures the metadata branch root tree contains a vercel.json disabling deployments for Entire branches when Vercel support is enabled in cached settings. Existing vercel.json content is preserved.
func MergeDeploymentDisabled ¶
MergeDeploymentDisabled sets deploymentEnabled["entire/**"] = false while preserving other fields.
func ResetSettingsCache ¶
func ResetSettingsCache()
ResetSettingsCache clears the cached settings. Primarily intended for tests that exercise multiple repositories in one process.
Types ¶
This section is empty.