balena-io-modules / balena-procbots

Process bots used for automating the development and deployment CI pipeline
https://balena-io-modules.github.io/balena-procbots/
Apache License 2.0
7 stars 3 forks source link

Versionbot: VB does bizarre things if the PR has a prerelease version bump #348

Open pimterry opened 6 years ago

pimterry commented 6 years ago

In https://github.com/resin-io-modules/resin-device-init/pull/25, the PR contained a version bump already (from 4.0.1 to 4.1.0-rc1), because I've been testing it integrated downstream before merging, and I needed a prerelease version with which to do so.

I probably should've remembered to remove this before merging, but it'd be nice if I didn't have to, or if VB complained up front. Instead, VB created a commit for the previous version number (v4.0.1), which did change the files to the right version (4.1.0), but put the changelog entry underneath the latest version number, bizarrely. VB's commit is here: https://github.com/resin-io-modules/resin-device-init/pull/25/commits/65b17f797aad6685364e7b2c8c5cccfc59557368. It then merged the PR, but failed to tag it, because it tried to tag with the old version that already exists.

This is a messy case and it'd be fine if VB rejected it, but it's a bit awkward that VB has instead merrily merged it, done some odd things en route, and left master in a broken state.

lurch commented 6 years ago

put the changelog entry underneath the latest version number, bizarrely

That part is because your Changelog's header doesn't adhere to the standard header which means the default value here skipped too many lines, and thought the ## v4.0.1 - 2017-11-21 was simply part of the header.

@jhermsmeier encountered the same thing on one of the Etcher-related module repos a while ago ;-)

I.e. this will happen again, until you fix your CHANGELOG.md

pimterry commented 6 years ago

@lurch true. I thought that'd been fixed, but clearly not. Good spot, thanks!

I think the issue with the wrong version tag being used is separate, and still remains, but I'll get this sorted too.