Skip to content

Commit 0a49a8b

Browse files
committed
Add support for git submodules in Get-Extension
1 parent 5ffdefc commit 0a49a8b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

extension/BuildPhpExtension/private/Get-Extension.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ function Get-Extension {
7777
git remote add origin $ExtensionUrl > $null 2>&1
7878
git fetch --depth=1 origin $ExtensionRef > $null 2>&1
7979
git checkout FETCH_HEAD > $null 2>&1
80+
81+
if (Test-Path -LiteralPath (Join-Path (Get-Location).Path '.gitmodules')) {
82+
git submodule sync --recursive > $null 2>&1
83+
git submodule update --init --recursive --depth 1 > $null 2>&1
84+
}
8085
}
8186
}
8287
} catch {

0 commit comments

Comments
 (0)