Chore: avoid writing appprofile.php

This commit is contained in:
SukkaW 2023-12-19 20:25:18 +08:00
parent 464ed3cd35
commit 7a6363d117
2 changed files with 11 additions and 1 deletions

View File

@ -129,7 +129,7 @@ function generateAppProfile(
result.push(
'<?php',
'',
`// Build ${new Date().toISOString()}`,
`// # Build ${new Date().toISOString()}`,
'',
'declare(strict_types=1);',
'',

View File

@ -34,6 +34,16 @@ export async function compareAndWriteFile(linesA: string[], filePath: string) {
if (lineA[0] === '#' && lineB[0] === '#') {
continue;
}
if (
lineA[0] === '/'
&& lineA[1] === '/'
&& lineA[3] === '#'
&& lineB[0] === '/'
&& lineB[1] === '/'
&& lineB[3] === '#'
) {
continue;
}
if (lineA !== lineB) {
return false;