renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.14k stars 2.23k forks source link

Bump package.json version #861

Closed rarkins closed 6 years ago

rarkins commented 6 years ago

As suggested by @gunar on twitter, this would see Renovate bump the version in package.json.

rarkins commented 6 years ago

I suggest we'd call this "bumpVersion" and make it boolean (false by default). We would do this manually rather than actually running "npm version patch".

rarkins commented 6 years ago

Perhaps "bumpVersion" and default to "none" but allow "patch" or "minor" as values.

rarkins commented 6 years ago

Waiting on #1016, otherwise it's hard to make sure we don't accidentally bump it twice if branch is updated with second commit.

gunar commented 6 years ago

@rarkins think you can move this forward now? :)

rarkins commented 6 years ago

@gunar yes, good idea. Nowadays, Renovate always has only one commit per branch, so it makes it much easier.

rarkins commented 6 years ago

@gunar now implemented and live in the app, if you'd like to try it out again.

e.g. to bump version every time, just add this to the root of your renovate.json:

  "bumpVersion": true

If you only want it for dependencies (not devDependencies), then add this:

  "dependencies": {
    "bumpVersion": true
  }
gunar commented 6 years ago

@rarkins you are awesome! will try asap.

ghost commented 6 years ago

@rarkins I'd like to quickly ask about bumpVersion. It seems like the setting "bumpVersion": "patch" is ignored if the major version is 0, but works for numbers greater than 0. Is this an intended behaviour?

rarkins commented 6 years ago

Not intended. Could you raise a bug report?

ghost commented 6 years ago

@rarkins Apparently the issue resolved all of a sudden, but I stumbled upon another issue I will raise a bug report for when I am able to recreate it.