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

[Jade] Unify package version numbers #79

Merged
merged 1 commit into from Aug 18, 2016

Conversation

Projects
None yet
3 participants
@130s
Copy link
Member

commented Aug 18, 2016

See davetcoleman/moveit_merge#9 for more.

Updated version number of packages using a simple script (pasted at the bottom).

  • Once this LGT, I'll do so for Indigo too. And maybe directly commit w/o PR to not bother maintainers if no objection (I don't mind opening PRs).
  • Version here is 0.8.2 instead of 0.8.3 as discussed in davetcoleman/moveit_merge#9 (comment); Once this gets merged, running catkin_prepare_release will increment all versions to 0.8.3.
  • No package.xml found in some folders, incl. moveit_experimental, which indicates it's not ready to be released. So I leave them as they are.
  • Version of moveit_ikfast not updated (#44). The script updates it but had to manually revert it.
#!/usr/bin/env python

import fileinput
import os
import re
import sys

def find_all(name, path):
    '''
    http://stackoverflow.com/questions/1724693/find-a-file-in-python
    @param name: (str) File name to be found.
    @param path: (str) Top level path to search.
    '''
    result = []
    for root, dirs, files in os.walk(path):
        if name in files:
            result.append(os.path.join(root, name))
    return result

def replace(filename, pattern, subst):
    '''
    http://stackoverflow.com/a/13641746/577001
    RegEx capable.
    '''

    # Read contents from filename as a single string
    file_handle = open(filename, 'r')
    file_string = file_handle.read()
    file_handle.close()

    # Use RE package to allow for replacement (also allowing for (multiline) REGEX)
    file_string = (re.sub(pattern, subst, file_string))

    # Write contents to file.
    # Using mode 'w' truncates the file.
    file_handle = open(filename, 'w')
    file_handle.write(file_string)
    file_handle.close()

if __name__ == "__main__":
    # Find all package.xml files in sub-folders.
    files_found = find_all('package.xml', '/home/rosnoodle/cws_planning/src/ros-planning/moveit')
    for f in files_found:
        print(f)
        replace(f, "<version>.*</version>", "<version>0.8.2</version>")
@v4hn

This comment has been minimized.

Copy link
Member

commented Aug 18, 2016

And maybe directly commit w/o PR to not bother maintainers if no objection (I don't mind opening PRs).

As discussed before, you are free to do that.

@davetcoleman

This comment has been minimized.

Copy link
Member

commented Aug 18, 2016

Thanks so much for working on this, I agree with @v4hn about indigo

@davetcoleman davetcoleman merged commit 68023f7 into ros-planning:jade-devel Aug 18, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@130s 130s deleted the 130s:j/unify_version branch Sep 1, 2016

@130s 130s referenced this pull request Sep 1, 2016

Merged

[util] Add in-file string replacement command. #79

0 of 2 tasks complete

cschindlbeck pushed a commit to cschindlbeck/moveit that referenced this pull request Aug 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.