/** * Git tag-based version source for Go, Swift, and similar ecosystems. * * @packageDocumentation */ import type { VersionSourceProvider } from './provider'; /** * Reads version from the latest Git tag. Writing creates a new annotated tag. * * @remarks * This provider is used for languages where the version is determined * entirely by Git tags (Go, Swift, PHP/Packagist). * * The tag prefix (`v` by default) is auto-detected from existing tags * when writing, so projects using unprefixed tags (e.g. `1.0.0`) stay * consistent. * * @public * @since 0.3.0 */ export declare class GitTagSource implements VersionSourceProvider { /** Human-readable provider name. */ readonly name = "git-tag"; /** Empty string since git-tag has no manifest file. */ readonly manifestFile = ""; /** * Returns `true` when `cwd` is inside a Git repository. * * @param cwd - Project directory to check. * @returns Whether a Git repository is found. */ exists(cwd: string): boolean; /** * Reads the version string from the latest Git tag. * * @param cwd - Project directory containing the Git repository. * @returns The version string extracted from the latest version tag. */ getVersion(cwd: string): string; /** * Creates a new annotated Git tag for the given version. * * @param version - Version string to tag. * @param cwd - Project directory containing the Git repository. */ setVersion(version: string, cwd: string): void; /** Try version-like tag patterns, fall back to any tag. */ private describeVersionTag; /** Detect whether existing tags use a `v` prefix or not. */ private detectPrefix; } //# sourceMappingURL=git-tag.d.ts.map