mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
Take care of shallow clones in migrate-to-v5
This commit is contained in:
parent
5fc81d0a3e
commit
39a6a7dbb1
@ -42,8 +42,9 @@ def validate_v4(bench='.'):
|
||||
|
||||
def checkout_v5(repo, bench='.'):
|
||||
cwd = os.path.join(bench, 'apps', repo)
|
||||
unshallow = "--unshallow" if os.path.exists(os.path.join(cwd, ".git", "shallow")) else ""
|
||||
if os.path.exists(cwd):
|
||||
exec_cmd("git fetch upstream", cwd=cwd)
|
||||
exec_cmd("git config --add remote.upstream.fetch '+refs/heads/*:refs/remotes/upstream/*'", cwd=cwd)
|
||||
exec_cmd("git fetch upstream {unshallow}".format(unshallow=unshallow), cwd=cwd)
|
||||
exec_cmd("git checkout v5.0", cwd=cwd)
|
||||
exec_cmd("git clean -df", cwd=cwd)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user