mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Chore: avoid writing appprofile.php
This commit is contained in:
parent
464ed3cd35
commit
7a6363d117
@ -129,7 +129,7 @@ function generateAppProfile(
|
|||||||
result.push(
|
result.push(
|
||||||
'<?php',
|
'<?php',
|
||||||
'',
|
'',
|
||||||
`// Build ${new Date().toISOString()}`,
|
`// # Build ${new Date().toISOString()}`,
|
||||||
'',
|
'',
|
||||||
'declare(strict_types=1);',
|
'declare(strict_types=1);',
|
||||||
'',
|
'',
|
||||||
|
|||||||
@ -34,6 +34,16 @@ export async function compareAndWriteFile(linesA: string[], filePath: string) {
|
|||||||
if (lineA[0] === '#' && lineB[0] === '#') {
|
if (lineA[0] === '#' && lineB[0] === '#') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
lineA[0] === '/'
|
||||||
|
&& lineA[1] === '/'
|
||||||
|
&& lineA[3] === '#'
|
||||||
|
&& lineB[0] === '/'
|
||||||
|
&& lineB[1] === '/'
|
||||||
|
&& lineB[3] === '#'
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (lineA !== lineB) {
|
if (lineA !== lineB) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user