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

130s
Copy link
Contributor

@130s 130s commented Aug 18, 2016

See davetcoleman/moveit_merge#9 for more.

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

#!/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
Copy link
Contributor

v4hn 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
Copy link
Member

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

@davetcoleman davetcoleman merged commit 68023f7 into moveit:jade-devel Aug 18, 2016
@130s 130s deleted the j/unify_version branch September 1, 2016 00:06
JafarAbdi pushed a commit to JafarAbdi/moveit that referenced this pull request Mar 24, 2022
* Docker ci: download and cleanup MoveIt sources in single RUN command to keep small image size.
* Docker source: fix build
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.

None yet

3 participants