-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.json5
More file actions
41 lines (41 loc) · 1.23 KB
/
version.json5
File metadata and controls
41 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
vars: {
major: 2,
minor: 0,
patch: 2,
build: 20250803,
revision: 0,
tz: "America/Los_Angeles",
},
calcVars: {
nextBuild: "now::year * 10000 + now::month * 100 + now::day",
},
operations: {
incrMajor: "major += 1; minor = 0; patch = 0; revision = 0; build = nextBuild",
incrMinor: "minor += 1; patch = 0; revision = 0; build = nextBuild",
incrPatch: "patch += 1; revision = 0; build = nextBuild",
incrRevision: "revision += 1; build = nextBuild",
},
targets: [
{
description: "Cargo Package",
files: ["Cargo.toml"],
updates: [
{
search: '^(?P<begin>version\\s*=\\s*")\\d+\\.\\d+\\.\\d+(?P<end>"\\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) + "." + str::from(revision)',
},
],
}