|
|
@@ -516,14 +516,6 @@ jobs:
|
|
|
KSUN_COMMIT="$KSU_INPUT"
|
|
|
fi
|
|
|
|
|
|
- # Extract version info
|
|
|
- COMMITS_COUNT=$(git rev-list --count HEAD)
|
|
|
- BASE_VERSION=30000
|
|
|
- KSU_VERSION=$(expr $COMMITS_COUNT "+" $BASE_VERSION)
|
|
|
-
|
|
|
- # Extract git tag
|
|
|
- KSU_GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "no-tag")
|
|
|
-
|
|
|
# The manager is built on the OFFICIAL KernelSU-Next repo
|
|
|
# (pershoot's workflows are all disabled). Find the official dev
|
|
|
# commit this fork's branch is synced with (merge-base of our
|
|
|
@@ -545,6 +537,18 @@ jobs:
|
|
|
STOCK_COMMIT=$(git merge-base HEAD FETCH_HEAD)
|
|
|
echo "KSU Stock Commit (official sync point): $STOCK_COMMIT"
|
|
|
|
|
|
+ # Extract version info — anchored to the official sync point
|
|
|
+ # (STOCK_COMMIT), i.e. the commit the linked manager is built from.
|
|
|
+ # Mirrors pershoot c0a2c5fd: count the merge-base with origin, not
|
|
|
+ # the fork's extra commits, so the version shown in the release
|
|
|
+ # notes matches what the kernel reports and the manager displays.
|
|
|
+ COMMITS_COUNT=$(git rev-list --count "$STOCK_COMMIT")
|
|
|
+ BASE_VERSION=30000
|
|
|
+ KSU_VERSION=$(expr $COMMITS_COUNT "+" $BASE_VERSION)
|
|
|
+
|
|
|
+ # Extract git tag at the sync point
|
|
|
+ KSU_GIT_TAG=$(git describe --tags --abbrev=0 "$STOCK_COMMIT" 2>/dev/null || echo "no-tag")
|
|
|
+
|
|
|
MANAGER_RUN_ID=$(curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors "https://api.github.com/repos/KernelSU-Next/KernelSU-Next/actions/workflows/build-manager-ci.yml/runs?head_sha=${STOCK_COMMIT}" | jq -r '.workflow_runs[0].id // empty')
|
|
|
if [[ -n "${MANAGER_RUN_ID:-}" ]]; then
|
|
|
KSU_MANAGER="https://github.com/KernelSU-Next/KernelSU-Next/actions/runs/${MANAGER_RUN_ID}"
|