Skip to content

Commit ea20373

Browse files
committed
Run the post import/add/update routines when doing deploy
1 parent 7c5df48 commit ea20373

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mbed/mbed.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ def import_(url, path=None, depth=None, protocol=None, top=True):
13411341
cwd_root = repo.path
13421342

13431343
with cd(repo.path):
1344-
deploy(depth=depth, protocol=protocol)
1344+
deploy(depth=depth, protocol=protocol, top=False)
13451345

13461346
if top:
13471347
program = Program(repo.path)
@@ -1353,7 +1353,7 @@ def import_(url, path=None, depth=None, protocol=None, top=True):
13531353
dict(name='--depth', nargs='?', help='Number of revisions to fetch from the remote repository. Default: all revisions.'),
13541354
dict(name='--protocol', nargs='?', help='Transport protocol for the source control management. Supported: https, http, ssh, git. Default: inferred from URL.'),
13551355
help='Import missing dependencies in the current program or library.')
1356-
def deploy(depth=None, protocol=None):
1356+
def deploy(depth=None, protocol=None, top=True):
13571357
repo = Repo.fromrepo()
13581358
repo.ignores()
13591359

@@ -1366,6 +1366,10 @@ def deploy(depth=None, protocol=None):
13661366
import_(lib.fullurl, lib.path, depth=depth, protocol=protocol, top=False)
13671367
repo.ignore(relpath(repo.path, lib.path))
13681368

1369+
if top:
1370+
program = Program(repo.path)
1371+
program.post_action()
1372+
13691373

13701374
# Add library command
13711375
@subcommand('add',

0 commit comments

Comments
 (0)