{ vars: { major: 1, minor: 0, patch: 0, build: 1, tz: "America/Los_Angeles", }, calcVars: { nextBuild: "build + 1", }, operations: { incrMajor: "major += 1; minor = 0; patch = 0; build = nextBuild", incrMinor: "minor += 1; patch = 0; build = nextBuild", incrPatch: "patch += 1; build = nextBuild", incrBuild: "build = nextBuild", }, targets: [ { description: "Cargo Package", files: ["Cargo.toml"], updates: [ { search: '^(?Pversion\\s*=\\s*")\\d+\\.\\d+\\.\\d+(?P"\\s*)$', replace: 'begin + str::from(major) + "." + str::from(minor) + "." + str::from(patch) + end', }, ], }, { description: "Git Tag Name", files: ["scratch/version.tag.txt"], write: 'str::from(major) + "." + str::from(minor) + "." + str::from(patch)', }, { description: "Git Tag Description", files: ["scratch/version.desc.txt"], write: '"Version " + str::from(major) + "." + str::from(minor) + "." + str::from(patch) + "+" + str::from(build)', }, ], }