Skip to content

Commit 25faefa

Browse files
committed
Add Manual KSUN version calculation
1 parent e932884 commit 25faefa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/actions/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ runs:
143143
else
144144
curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s ${{ inputs.ksun_branch }}
145145
fi
146+
147+
git submodule update --init --recursive
146148
147149
- name: Apply SUSFS Patches
148150
shell: bash
@@ -163,7 +165,10 @@ runs:
163165
susfs_version=$(grep '#define SUSFS_VERSION' ../common/include/linux/susfs.h | awk -F'"' '{print $2}')
164166
echo "SUSVER=$susfs_version" >> $GITHUB_ENV
165167
BASE_VERSION=10200
166-
KSU_VERSION=$(expr $(curl -sI "https://api.github.com/repos/KernelSU-Next/KernelSU-Next/commits?sha=${{ inputs.ksun_branch }}&per_page=1" | grep -i "link:" | sed -n 's/.*page=\([0-9]*\)>; rel="last".*/\1/p') "+" $BASE_VERSION)
168+
cd ./kernel
169+
KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" $BASE_VERSION)
170+
cd ..
171+
sed -i "s/DKSU_VERSION=11998/DKSU_VERSION=${KSU_VERSION}/" Makefile
167172
echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
168173
echo "KernelSU Next Version: $KSU_VERSION"
169174
echo "SusFS Version: $susfs_version"

0 commit comments

Comments
 (0)