mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 00:06:36 +00:00
compare app and repo to set repo
This commit is contained in:
parent
40247bae0f
commit
6a0a7223d2
@ -60,10 +60,8 @@ def update_branches_and_check_for_changelog(repo, bump_type, develop='develop',
|
|||||||
if develop != 'develop':
|
if develop != 'develop':
|
||||||
update_branch(repo, 'develop', remote=remote, app=app)
|
update_branch(repo, 'develop', remote=remote, app=app)
|
||||||
|
|
||||||
if os.path.basename(repo) != app:
|
repo = os.path.join('apps', app) if os.path.basename(repo) != app else repo
|
||||||
repo = app
|
|
||||||
repo = os.path.join('apps', repo)
|
|
||||||
|
|
||||||
git.Repo(repo).git.checkout(develop)
|
git.Repo(repo).git.checkout(develop)
|
||||||
check_for_unmerged_changelog(repo)
|
check_for_unmerged_changelog(repo)
|
||||||
|
|
||||||
@ -87,11 +85,8 @@ def check_for_unmerged_changelog(repo):
|
|||||||
|
|
||||||
def get_release_message(repo_path, develop_branch='develop', master_branch='master', app=None):
|
def get_release_message(repo_path, develop_branch='develop', master_branch='master', app=None):
|
||||||
|
|
||||||
if os.path.basename(repo_path) != app:
|
repo_path = os.path.join('apps', app) if os.path.basename(repo_path) != app else repo_path
|
||||||
repo_path = app
|
|
||||||
repo_path = os.path.join('apps', repo_path)
|
|
||||||
|
|
||||||
|
|
||||||
print 'getting release message for', repo_path, 'comparing', master_branch, '...', develop_branch
|
print 'getting release message for', repo_path, 'comparing', master_branch, '...', develop_branch
|
||||||
repo = git.Repo(repo_path)
|
repo = git.Repo(repo_path)
|
||||||
g = repo.git
|
g = repo.git
|
||||||
@ -101,10 +96,8 @@ def get_release_message(repo_path, develop_branch='develop', master_branch='mast
|
|||||||
|
|
||||||
|
|
||||||
def bump_repo(repo, bump_type, develop='develop', master='master', remote='upstream', app=None):
|
def bump_repo(repo, bump_type, develop='develop', master='master', remote='upstream', app=None):
|
||||||
if os.path.basename(repo) != app:
|
repo = os.path.join('apps', app) if os.path.basename(repo) != app else repo
|
||||||
repo = app
|
|
||||||
repo = os.path.join('apps', repo)
|
|
||||||
|
|
||||||
current_version = get_current_version(repo)
|
current_version = get_current_version(repo)
|
||||||
new_version = get_bumped_version(current_version, bump_type)
|
new_version = get_bumped_version(current_version, bump_type)
|
||||||
|
|
||||||
@ -167,9 +160,7 @@ def set_filename_version(filename, version_number, pattern):
|
|||||||
f.write(contents)
|
f.write(contents)
|
||||||
|
|
||||||
def commit_changes(repo_path, version, app=None):
|
def commit_changes(repo_path, version, app=None):
|
||||||
if os.path.basename(repo_path) != app:
|
repo_path = os.path.join('apps', app) if os.path.basename(repo_path) != app else repo_path
|
||||||
repo_path = app
|
|
||||||
repo_path = os.path.join('apps', repo_path)
|
|
||||||
|
|
||||||
print 'committing version change to', repo_path
|
print 'committing version change to', repo_path
|
||||||
|
|
||||||
@ -182,9 +173,7 @@ def commit_changes(repo_path, version, app=None):
|
|||||||
|
|
||||||
def create_release(repo_path, version, remote='origin', develop_branch='develop', master_branch='master', app=None):
|
def create_release(repo_path, version, remote='origin', develop_branch='develop', master_branch='master', app=None):
|
||||||
|
|
||||||
if os.path.basename(repo_path) != app:
|
repo_path = os.path.join('apps', app) if os.path.basename(repo_path) != app else repo_path
|
||||||
repo_path = app
|
|
||||||
repo_path = os.path.join('apps', repo_path)
|
|
||||||
|
|
||||||
print 'creating release for version', version
|
print 'creating release for version', version
|
||||||
repo = git.Repo(repo_path)
|
repo = git.Repo(repo_path)
|
||||||
@ -205,9 +194,7 @@ def create_release(repo_path, version, remote='origin', develop_branch='develop'
|
|||||||
|
|
||||||
def push_release(repo_path, develop_branch='develop', master_branch='master', app=None):
|
def push_release(repo_path, develop_branch='develop', master_branch='master', app=None):
|
||||||
|
|
||||||
if os.path.basename(repo_path) != app:
|
repo_path = os.path.join('apps', app) if os.path.basename(repo_path) != app else repo_path
|
||||||
repo_path = app
|
|
||||||
repo_path = os.path.join('apps', repo_path)
|
|
||||||
|
|
||||||
print 'pushing branches', master_branch, develop_branch, 'of', repo_path
|
print 'pushing branches', master_branch, develop_branch, 'of', repo_path
|
||||||
repo = git.Repo(repo_path)
|
repo = git.Repo(repo_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user