0
1
Fork 0
This commit is contained in:
Samuel Lijin 2024-04-30 23:21:15 +02:00 committed by GitHub
commit 77b2b14050
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -44,6 +44,7 @@ export interface IGitCommandManager {
getWorkingDirectory(): string
init(): Promise<void>
isDetached(): Promise<boolean>
lfsCheckout(): Promise<void>
lfsFetch(ref: string): Promise<void>
lfsInstall(): Promise<void>
log1(format?: string): Promise<string>
@ -340,6 +341,10 @@ class GitCommandManager {
return !output.stdout.trim().startsWith('refs/heads/')
}
async lfsCheckout(): Promise<void> {
await this.execGit(['lfs', 'checkout'])
}
async lfsFetch(ref: string): Promise<void> {
const args = ['lfs', 'fetch', 'origin', ref]

View File

@ -232,6 +232,11 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
await git.checkout(checkoutInfo.ref, checkoutInfo.startPoint)
core.endGroup()
// LFS checkout
core.startGroup('Checking out LFS objects')
await git.lfsCheckout()
core.endGroup()
// Submodules
if (settings.submodules) {
// Temporarily override global config