ros-infrastructure / catkin_pkg

Standalone Python library for the catkin build system.
https://github.com/ros/catkin
Other
47 stars 91 forks source link

catkin_pkg_create and catkin_prepare_release should make valid semantic versions #267

Closed sloretz closed 4 years ago

sloretz commented 4 years ago

By default catkin_create_pkg creates a package with a version number 0.0.0, and catkin_prepare_release automatically bumps the patch version. This results in a lot of packages releasing version 0.0.1, but semantic versioning recommends starting at 0.1.0.

Proposed solution:

dirk-thomas commented 4 years ago

Change the auto-bump-patch-version feature of catkin_prepare_release to only auto-bump if there exists a tag for the current version.

I don't like the idea of making the decision what to do based on more state. It just makes it more difficult for people to comprehend why it does different things in otherwise the same situation.

How about changing the default bump to use minor if your version is 0.0.1? The user will see the explicit prompt and should be able to explicitly request a patch bump.

sloretz commented 4 years ago

Looks like 0.0.z is valid after all. semver.org has a regular expression example that includes 0.0.4 as a valid version. Closing.

https://regex101.com/r/Ly7O1x/3/