repo_path[:repo_path.rfind('/')])
return search_last_build(last_build_url, release_name)
-def get_released_build(release_base, repo_path):
+def get_released_build(release_base, repo_path, release_name):
"""Return the lastest released build.
:param release_base: release base url.
base_contains = '/'.join(repo_path.split('/')[1:-1])
daily_url = os.path.join(release_base, 'daily', base_contains)
weekly_url = os.path.join(release_base, 'weekly', base_contains)
- return search_last_build(daily_url, True), \
- search_last_build(weekly_url, True)
+ return search_last_build(daily_url, release_name, True), \
+ search_last_build(weekly_url, release_name, True)
def _get_buildid(url):
"""Get build id from url"""
# generate current and releases repo diff
daily_repo_base, weekly_repo_base = get_released_build(releases_url,
- repo_path)
+ repo_path,
+ release_name)
if daily_repo_base:
daily_repo_url = os.path.join(daily_repo_base,