Open sarum9in opened 6 years ago
def get_current_version(wrapfile): cp = configparser.ConfigParser() cp.read(wrapfile) cp = cp['wrap-file'] patch_url = cp['patch_url'] arr = patch_url.split('/') branch = arr[-3] revision = int(arr[-2]) return branch, revision, cp['directory'], cp['source_filename'], cp['patch_filename']