mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-08 17:30:02 +02:00
🐛 Fix patch count warning
This commit is contained in:
parent
1e6254d448
commit
9272c22210
1 changed files with 9 additions and 3 deletions
|
@ -6,6 +6,8 @@ import * as gitPatch from './gitPatch'
|
|||
import * as copyPatch from './copyPatches'
|
||||
import * as brandingPatch from './brandingPatch'
|
||||
import { join } from 'path'
|
||||
import { writeFileSync } from 'fs'
|
||||
import { patchCountFile } from '../../middleware/patch-check'
|
||||
|
||||
type ListrTaskGroup = {
|
||||
title: string
|
||||
|
@ -61,11 +63,15 @@ function importFolders(): ListrTaskGroup {
|
|||
}
|
||||
|
||||
function importGitPatch(): ListrTaskGroup {
|
||||
const patches = sync('**/*.patch', { nodir: true, cwd: SRC_DIR }).map(
|
||||
(path) => join(SRC_DIR, path)
|
||||
)
|
||||
|
||||
writeFileSync(patchCountFile, patches.length.toString())
|
||||
|
||||
return patchMethod(
|
||||
'git',
|
||||
sync('**/*.patch', { nodir: true, cwd: SRC_DIR }).map((path) =>
|
||||
join(SRC_DIR, path)
|
||||
),
|
||||
patches,
|
||||
(path) => path,
|
||||
async (path) => await gitPatch.apply(path)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue