@naxodev/gonx
Version:
Modern Nx plugin to use Go in a Nx workspace
25 lines (24 loc) • 1.2 kB
TypeScript
import { ProjectGraph, Tree } from '@nx/devkit';
import { VersionActions } from 'nx/release';
import { NxReleaseVersionConfiguration } from 'nx/src/config/nx-json';
/**
* Implements versioning actions for Go projects.
* This class manages versioning operations for Go modules using Git tags.
*/
export default class GoVersionActions extends VersionActions {
validManifestFilenames: string[];
readCurrentVersionFromSourceManifest(tree: Tree): Promise<{
currentVersion: string;
manifestPath: string;
} | null>;
readCurrentVersionFromRegistry(tree: Tree, currentVersionResolverMetadata: NxReleaseVersionConfiguration['currentVersionResolverMetadata']): Promise<{
currentVersion: string | null;
logText: string;
} | null>;
readCurrentVersionOfDependency(tree: Tree, projectGraph: ProjectGraph, dependencyProjectName: string): Promise<{
currentVersion: string | null;
dependencyCollection: string | null;
}>;
updateProjectVersion(tree: Tree, newVersion: string): Promise<string[]>;
updateProjectDependencies(tree: Tree, projectGraph: ProjectGraph, dependenciesToUpdate: Record<string, string>): Promise<string[]>;
}