Explorar el Código

ci(build): improve version logging in setlocalversion script

Enhance debug logging by printing individual version components separately before combining them into the final version string. This makes it easier to diagnose version-related issues during builds.
TheWildJames hace 1 año
padre
commit
8d39361079
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      .github/workflows/build.yml

+ 2 - 3
.github/workflows/build.yml

@@ -331,10 +331,9 @@ jobs:
           #Set Kernel Name
           if [ "${{ inputs.kernel_version }}" = "6.6" ]; then
             #sed -i 's|^\(CONFIG_LOCALVERSION=".*\)"$|\1-🌱-Wild"|' ./common/arch/arm64/configs/gki_defconfig
-            perl -pi -e 's/echo "\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}"/val="\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}"; echo "Kernel localversion: \$val" >\&2; echo "\$val"; exit 0/' ./common/scripts/setlocalversion
+            perl -pi -e 's/echo "\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}"/echo "KERNELVERSION: \$\{KERNELVERSION\}" >\&2; echo "file_localversion: \$\{file_localversion\}" >\&2; echo "config_localversion: \$\{config_localversion\}" >\&2; echo "LOCALVERSION: \$\{LOCALVERSION\}" >\&2; echo "scm_version: \$\{scm_version\}" >\&2; val="\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}"; echo "Final version: \$val" >\&2; echo "\$val"; exit 0/' ./common/scripts/setlocalversion
           else
-            sed -i 's|echo "${KERNELVERSION}${file_localversion}${config_localversion}${LOCALVERSION}${scm_version}"|echo "::notice::KERNELVERSION=$KERNELVERSION"; echo "::notice::file_localversion=$file_localversion"; echo "::notice::config_localversion=$config_localversion"; echo "::notice::LOCALVERSION=$LOCALVERSION"; echo "::notice::scm_version=$scm_version"; echo "${KERNELVERSION}${file_localversion}${config_localversion}${LOCALVERSION}${scm_version}"|' ./common/scripts/setlocalversion
-            #perl -0777 -pi -e 's/(echo "\$res")(?!.*echo "\$res")/echo "\-${{ inputs.android_version }}-🌱-Wild"/s' ./common/scripts/setlocalversion
+            perl -pi -e 's/echo "\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}"/echo "KERNELVERSION: \$\{KERNELVERSION\}" >\&2; echo "file_localversion: \$\{file_localversion\}" >\&2; echo "config_localversion: \$\{config_localversion\}" >\&2; echo "LOCALVERSION: \$\{LOCALVERSION\}" >\&2; echo "scm_version: \$\{scm_version\}" >\&2; val="\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}"; echo "Final version: \$val" >\&2; echo "\$val"; exit 0/' ./common/scripts/setlocalversion
           fi
               
           #Set Kernel Timestamp