This repository has been archived by the owner on May 17, 2022. It is now read-only.
forked from external-secrets/kubernetes-external-secrets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.versionrc.js
52 lines (46 loc) · 1.54 KB
/
.versionrc.js
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
42
43
44
45
46
47
48
49
50
51
52
const chart = {
filename: "charts/kubernetes-external-secrets/Chart.yaml",
updater: {
readVersion(contents) {
const [match] = contents.match(/appVersion: [a-zA-Z0-9\.]*/);
return match.split(": ")[1];
},
writeVersion: (contents, version) =>
contents
.replace(/appVersion: [a-zA-Z0-9\.]*/, `appVersion: ${version}`)
.replace(/version: [a-zA-Z0-9\.]*/, `version: ${version}`),
},
};
const values = {
filename: "charts/kubernetes-external-secrets/values.yaml",
updater: {
readVersion(contents) {
const [match] = contents.match(/tag: [a-zA-Z0-9\.]*/);
return match.split(": ")[1];
},
writeVersion: (contents, version) =>
contents.replace(/tag: [a-zA-Z0-9\.]*/, `tag: ${version}`),
},
};
const readme = {
filename: "charts/kubernetes-external-secrets/README.md",
updater: {
readVersion(contents) {
const [match] = contents.match(
/kubernetes-external-secrets\sImage\stag\s+\|\s`([0-9]+.[0-9]+.[0-9]+)`/
);
return match.split("`")[1];
},
writeVersion: (contents, version) =>
contents.replace(
/(kubernetes-external-secrets\sImage\stag\s+\|\s)`([0-9]+.[0-9]+.[0-9]+)`/,
`$1\`${version}\``
),
},
};
module.exports = {
scripts: {
"prechangelog": "(cd charts/kubernetes-external-secrets && helm package . && helm repo index --merge ../../docs/index.yaml ./ && mv *.tgz ../../docs && mv index.yaml ../../docs && git add ../../docs)"
},
bumpFiles: ['package.json', 'package-lock.json', chart, values, readme],
};