ff
This commit is contained in:
@@ -150,7 +150,7 @@ def setup_dependencies(ctx, check, prepare_args):
|
|||||||
|
|
||||||
@ffx.command(name='upgrade')
|
@ffx.command(name='upgrade')
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
@click.argument('branch', required=False, default='main')
|
@click.option('--branch', type=str, default='', help='Checkout this branch before pulling')
|
||||||
def upgrade(ctx, branch):
|
def upgrade(ctx, branch):
|
||||||
bundleRepoPath = getBundleRepoPath()
|
bundleRepoPath = getBundleRepoPath()
|
||||||
bundlePipPath = getBundlePipPath()
|
bundlePipPath = getBundlePipPath()
|
||||||
@@ -161,8 +161,12 @@ def upgrade(ctx, branch):
|
|||||||
if not os.path.isfile(bundlePipPath):
|
if not os.path.isfile(bundlePipPath):
|
||||||
raise click.ClickException(f"Bundle pip not found at {bundlePipPath}")
|
raise click.ClickException(f"Bundle pip not found at {bundlePipPath}")
|
||||||
|
|
||||||
commandSequences = [
|
commandSequences = []
|
||||||
['git', 'checkout', branch],
|
|
||||||
|
if branch:
|
||||||
|
commandSequences.append(['git', 'checkout', branch])
|
||||||
|
|
||||||
|
commandSequences += [
|
||||||
['git', 'pull'],
|
['git', 'pull'],
|
||||||
[bundlePipPath, 'install', '--editable', '.'],
|
[bundlePipPath, 'install', '--editable', '.'],
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user