[make init] update submodule's remotes (#5534)
* [make reset] update submodule's remotes This change is to address an issue where when using a long standing repo to build image, the submodule could become out-dated with their remotes so that make init is no longer to bring all submoudles to the latest. The consequence is weird build failures. When we update/switch branch in a long standing repo, we will issue 'make reset' to get repo ready for next build. Updating all submodule's remotes during "make reset" address the issue. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
This commit is contained in:
parent
72297749df
commit
f7ee983601
@ -301,6 +301,7 @@ reset :
|
|||||||
git reset --hard;
|
git reset --hard;
|
||||||
git submodule foreach --recursive 'git clean -xfdf || true';
|
git submodule foreach --recursive 'git clean -xfdf || true';
|
||||||
git submodule foreach --recursive 'git reset --hard || true';
|
git submodule foreach --recursive 'git reset --hard || true';
|
||||||
|
git submodule foreach --recursive 'git remote update || true';
|
||||||
git submodule update --init --recursive;
|
git submodule update --init --recursive;
|
||||||
echo "Reset complete!";
|
echo "Reset complete!";
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user