|
@@ -524,11 +524,32 @@ jobs:
|
|
|
# Extract git tag
|
|
# Extract git tag
|
|
|
KSU_GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "no-tag")
|
|
KSU_GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "no-tag")
|
|
|
|
|
|
|
|
- MANAGER_RUN_ID=$(curl -fsSL "https://api.github.com/repos/pershoot/KernelSU-Next/actions/workflows/build-manager-ci.yml/runs?head_sha=${KSUN_COMMIT}" | jq -r '.workflow_runs[0].id // empty')
|
|
|
|
|
|
|
+ # 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
|
|
|
|
|
+ # branch vs official dev), then link the manager build run for
|
|
|
|
|
+ # that commit. pershoot's own dev branch is intentionally ignored.
|
|
|
|
|
+ retry() {
|
|
|
|
|
+ local n=0
|
|
|
|
|
+ until [ "$n" -ge 5 ]; do
|
|
|
|
|
+ "$@" && return 0
|
|
|
|
|
+ n=$((n+1))
|
|
|
|
|
+ echo "retry $n/5 failed for: $*" >&2
|
|
|
|
|
+ sleep 5
|
|
|
|
|
+ done
|
|
|
|
|
+ return 1
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ OFFICIAL_KSU_REPO="https://github.com/KernelSU-Next/KernelSU-Next.git"
|
|
|
|
|
+ retry git fetch "$OFFICIAL_KSU_REPO" dev
|
|
|
|
|
+ STOCK_COMMIT=$(git merge-base HEAD FETCH_HEAD)
|
|
|
|
|
+ echo "KSU Stock Commit (official sync point): $STOCK_COMMIT"
|
|
|
|
|
+
|
|
|
|
|
+ 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
|
|
if [[ -n "${MANAGER_RUN_ID:-}" ]]; then
|
|
|
- KSU_MANAGER="https://github.com/pershoot/KernelSU-Next/actions/runs/${MANAGER_RUN_ID}"
|
|
|
|
|
|
|
+ KSU_MANAGER="https://github.com/KernelSU-Next/KernelSU-Next/actions/runs/${MANAGER_RUN_ID}"
|
|
|
else
|
|
else
|
|
|
- KSU_MANAGER="https://github.com/pershoot/KernelSU-Next/actions/workflows/build-manager-ci.yml"
|
|
|
|
|
|
|
+ KSU_MANAGER="https://github.com/KernelSU-Next/KernelSU-Next/actions/workflows/build-manager-ci.yml"
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
echo "Commits count: $COMMITS_COUNT"
|
|
echo "Commits count: $COMMITS_COUNT"
|