Quellcode durchsuchen

Modify KSU version extraction and Kbuild injection

Updated the action to extract KSU version info and inject it into Kbuild.
jimsterino98 vor 2 Monaten
Ursprung
Commit
1614dbfd37
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      .github/actions/ksun/action.yml

+ 4 - 2
.github/actions/ksun/action.yml

@@ -59,8 +59,7 @@ runs:
         CONFIG_KSU=y
         EOF
 
-    - name: Extract KSU Version Info
-      id: ksu-version
+    - name: Extract KSU Version Info and inject into Kbuild
       shell: bash
       run: |
         cd "$COMMON/KernelSU-Next"
@@ -73,6 +72,9 @@ runs:
         KSU_GIT_TAG=$(git describe --tags --abbrev=0 refs/remotes/origin/dev 2>/dev/null || echo "")
         KSU_COMMIT=$(git rev-parse --short refs/remotes/origin/dev 2>/dev/null)
         KSU_VERSION=$((30000 + KSU_GIT_VERSION))
+
+        sed -i "s/^KSU_VERSION_FALLBACK := 1$/KSU_VERSION_FALLBACK := ${KSU_VERSION}/" Kbuild
+        sed -i "s/^KSU_VERSION_TAG_FALLBACK := v0.0.1$/KSU_VERSION_TAG_FALLBACK := ${KSU_GIT_TAG}/" Kbuild
         
         echo "KSU_GIT_TAG=$KSU_GIT_TAG" >> $GITHUB_ENV
         echo "KSU_VERSION=$KSU_VERSION" >> $GITHUB_ENV