-
Notifications
You must be signed in to change notification settings - Fork 3
Allows using renovate.json
as file to update baseBranches
#1
base: master
Are you sure you want to change the base?
Conversation
…nches` property with `release`
@@ -6,7 +6,7 @@ const argv = require('yargs') | |||
type: 'string' | |||
}) | |||
.option('file', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the script only supports README.md
or renovate.json
, so I would add the .choices param (didn't test it out)
.option('file', {
description: 'append empty space to README.md or update renovate.json (one needs a file diff to create a bump PR)',
type: 'string',
choices: ['README.md', 'renovate.json']
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that you can add a new line in any file (doesn't have to be README.md
) but we can limit the script to just work with README.md
or renovate.json
. I will try with choices :)
const newLineReadmeEncoded = Buffer.from(newLineReadme).toString('base64') | ||
let newContent | ||
if (file === "renovate.json") { | ||
// Replace baseBranches with new release branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you extend the comment and describe how it looks before and after?
|
||
// create new release-branch | ||
const branchName = `bump-to-next-minor-version-${Date.now()}` | ||
const branchName = `bump-to-next-minor-version-${release}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the consequence is that you can only do 1 bump per release (which is most probably ok).
renovate.json
as file to update baseBranches
renovate.json
as file to update baseBranches
Reviewing the steps that we have to do in the release, I believe it would be useful to automate and unify some steps. In this case, we need to update the
renovate.json
in master branch, so it would be useful to do that instead of adding a new line in README.md