Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Allows using renovate.json as file to update baseBranches #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JordiVM
Copy link

@JordiVM JordiVM commented Sep 6, 2023

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

@@ -6,7 +6,7 @@ const argv = require('yargs')
type: 'string'
})
.option('file', {
Copy link
Owner

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']
  })

Copy link
Author

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
Copy link
Owner

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}`
Copy link
Owner

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).

@JordiVM JordiVM changed the title Allows passing using renovate.json as file to update baseBranches Allows using renovate.json as file to update baseBranches Nov 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants