import type { ReleasePlugin } from "../../plugin.ts";import { join } from "./deps.ts";
const plugin: ReleasePlugin = { name: "VersionFile", async preCommit( repo, _releaseType, _from, to, config, log, ): Promise<void> { const versionFile = "version.json"; const version = { version: to, }; if (!config.options.dry) { await Deno.writeTextFile( join(repo.path, versionFile), JSON.stringify(version, null, 2) + "\n", ); } else { log.info(`dryRun: Would have created ${versionFile} file`); } },};
export default plugin;