[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:
Ying Xie 2020-10-09 08:53:05 -07:00 committed by GitHub
parent 72297749df
commit f7ee983601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,6 +301,7 @@ reset :
git reset --hard;
git submodule foreach --recursive 'git clean -xfdf || true';
git submodule foreach --recursive 'git reset --hard || true';
git submodule foreach --recursive 'git remote update || true';
git submodule update --init --recursive;
echo "Reset complete!";
else