瀏覽代碼

Chore: avoid writing appprofile.php

SukkaW 2 年之前
父節點
當前提交
7a6363d117
共有 2 個文件被更改,包括 11 次插入1 次删除
  1. 1 1
      Build/build-sspanel-appprofile.ts
  2. 10 0
      Build/lib/create-file.ts

+ 1 - 1
Build/build-sspanel-appprofile.ts

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

+ 10 - 0
Build/lib/create-file.ts

@@ -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;