Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(catkin_prepare_release) Prompt tag name when it differs from new version number. #528

Closed
wants to merge 1 commit into from

Conversation

130s
Copy link
Member

@130s 130s commented Oct 4, 2013

Old title: (catkin_prepare_release) Add hyphen b/w tag and the new version number for svn.

@130s
Copy link
Member Author

130s commented Oct 4, 2013

Forgot to describe what this PR does. Notice the hyphen between the tag and the new version number:

now
svn cp -m "tagging agentsystem_ros_tutorials1.0.2" https://rtm-ros-robotics.googlecode.com/svn/trunk/agentsystem_ros_tutorials https://rtm-ros-robotics.googlecode.com/svn/tags/agentsystem_ros_tutorials1.0.2

new
svn cp -m "tagging agentsystem_ros_tutorials-1.0.2" https://rtm-ros-robotics.googlecode.com/svn/trunk/agentsystem_ros_tutorials https://rtm-ros-robotics.googlecode.com/svn/tags/agentsystem_ros_tutorials-1.0.2

@k-okada
Copy link
Contributor

k-okada commented Oct 4, 2013

+1
That's good for me

@dirk-thomas
Copy link
Member

The user can just specify a tag prefix with a trailing hyphen. I would rather not force him to have that hypen since else a tag like foo1.2.3 becomes impossible to do.

@130s
Copy link
Member Author

130s commented Oct 4, 2013

That makes sense. Then how about showing the tag that will be generated
before bumping the version do that users can terminate the command when
they don't like it? If that's good then I'll update my PR or open a new one.

@dirk-thomas
Copy link
Member

You could extend the question Prepare release of version ... to contain the tag name if it is different from the version. That would be good to add.

…sion number.

(catkin_prepare_release) Remove undesired linefeed.
@130s
Copy link
Member Author

130s commented Oct 7, 2013

@dirk-thomas Please review my updated pull request, with which the result would look like:

$ cd agentsystem_ros_tutorials
$ catkin_prepare_release
Prepare the source repository for a release.
Repository type: svn
Found packages: agentsystem_ros_tutorials, move_base_stage_tutorial
Prepare release of version '1.0.2' [Y/n]?n
$ catkin_prepare_release -t agentsystem_ros_tutorials
Prepare the source repository for a release.
Repository type: svn
Found packages: agentsystem_ros_tutorials, move_base_stage_tutorial
Prepare release of version '1.0.2' (tag name 'agentsystem_ros_tutorials1.0.2')  [Y/n]?n

(The title of PR is also updated.)

@130s
Copy link
Member Author

130s commented Oct 8, 2013

Dirk, wouldn't your commit return something like:

$ catkin_prepare_release -t foo
Prepare release of version 'foo1.0.2' [Y/n]?

Precisely speaking, foo1.0.2 is a tag name, not a version. Because in my experience releasing needs extra amount of care, I would rather separately display version and tag name in order to avoid users' confusion as much as possible.

@130s 130s reopened this Oct 8, 2013
@dirk-thomas
Copy link
Member

Yes, that would be displayed. This is the name the developer wants to give to that release. Since you are potentially tagging a part of the repo the version does not only the number since that would not be sufficient to identify the release.

@dirk-thomas
Copy link
Member

Would you prefer this?

if not args.non_interactive and not prompt_continue(fmt("Prepare release of version '@{bf}@{boldon}%s@{boldoff}@{reset}'%s" % (new_version, " (tagged as '@{bf}@{boldon}%s@{boldoff}@{reset}')" % tag_name if args.tag_prefix else '')), default=True):

@130s
Copy link
Member Author

130s commented Oct 8, 2013

Looks nice. Works great like this:

$ cd foo
$ catkin_prepare_release 
Prepare the source repository for a release.
Repository type: svn
Found packages: foo
Prepare release of version '1.0.2' [Y/n]?n
Aborted release, use option '--bump' to release a different version.
$ catkin_prepare_release  -t foo
Prepare the source repository for a release.
Repository type: svn
Found packages: foo
Prepare release of version '1.0.2' (tagged as 'foo1.0.2') [Y/n]?n
Aborted release, use option '--bump' to release a different version.

@130s 130s deleted the prep_release_svn_ext branch October 9, 2013 08:26
@130s
Copy link
Member Author

130s commented Oct 9, 2013

Thanks Dirk, this tremendously lowers our mental barrier for releasing our svn packages!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants