Skip to content

Commit

Permalink
feat(helm): bump helm appVersion on release
Browse files Browse the repository at this point in the history
  • Loading branch information
fredriklindberg committed Jun 24, 2021
1 parent 8e76ae5 commit e2d61eb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bumpFiles": [
{
"filename": "helm/Chart.yaml",
"updater": "scripts/bump-helm.cjs"
}
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"yargs": "^17.0.1"
},
"devDependencies": {
"standard-version": "^9.3.0"
"standard-version": "^9.3.0",
"yaml": "^1.10.2"
},
"scripts": {
"prepack": "scripts/build-env.sh > build.env",
Expand Down
12 changes: 12 additions & 0 deletions scripts/bump-helm.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const YAML = require('yaml')

module.exports.readVersion = function (contents) {
const yaml = YAML.parse(contents)
return yaml.appVersion
}

module.exports.writeVersion = function (contents, version) {
const yaml = YAML.parse(contents)
yaml.appVersion = version
return YAML.stringify(yaml)
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2150,6 +2150,11 @@ yallist@^4.0.0:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==

yaml@^1.10.2:
version "1.10.2"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==

yargs-parser@^20.2.2, yargs-parser@^20.2.3:
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
Expand Down

0 comments on commit e2d61eb

Please sign in to comment.