소스 검색

ci: fix regex pattern in kernel version script

The previous pattern could match multiple occurrences unintentionally. The updated regex adds a negative lookahead to ensure only the last occurrence is modified.
TheWildJames 1 년 전
부모
커밋
2c76cf9ac9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      .github/workflows/build.yml

+ 1 - 1
.github/workflows/build.yml

@@ -306,7 +306,7 @@ jobs:
           if [ "${{ inputs.kernel_version }}" = "6.6" ]; then
             perl -0777 -pi -e 's/(echo "\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}")/echo "\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}-🟢-Wild"/s' ./common/scripts/setlocalversion
           else
-            perl -0777 -pi -e 's/(echo "\$res")/echo "\$res-🟢-Wild"/s' ./common/scripts/setlocalversion
+            perl -0777 -pi -e 's/(echo "\$res")(?!.*echo "\$res")/echo "\$res-🟢-Wild"/s' ./common/scripts/setlocalversion
           fi
 
           #Set Kernel Timestamp