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

Sort authors/maintainers for correct email assignment #492

Merged
merged 1 commit into from
Mar 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions catkin_tools/verbs/catkin_create/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ def main(opts):
try:
# Get absolute path to directory containing package
package_dest_path = os.path.abspath(opts.path)

# Sort list of maintainers and authors (it will also be sorted inside
# PackageTemplate so by sorting it here, we ensure that the same order
# is used. This is important later when email addresses are assigned.
if opts.maintainers:
opts.maintainers.sort(key=lambda x: x[0])
if opts.authors:
opts.authors.sort(key=lambda x: x[0])

for package_name in opts.name:
print('Creating package "%s" in "%s"...' % (package_name, package_dest_path))
target_path = os.path.join(package_dest_path, package_name)
Expand Down