chore: migrate all URLs to git.jskdjs.cn, drop GitHub-specific distribution
This commit is contained in:
+1
-1
@@ -108,7 +108,7 @@ run_doctor() {
|
||||
fi
|
||||
|
||||
begin "Internet access"
|
||||
if command -v curl &>/dev/null && curl -s --max-time 3 https://github.com >/dev/null 2>&1; then
|
||||
if command -v curl &>/dev/null && curl -s --max-time 3 https://git.jskdjs.cn >/dev/null 2>&1; then
|
||||
end_ok; echo " Online"
|
||||
else
|
||||
end_fail; echo " Offline (expected in Recovery)"
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
GPG_KEY_URL="https://raw.githubusercontent.com/mateussiqueira/runaway/main/.github/runaway.gpg"
|
||||
GPG_KEY_URL="https://git.jskdjs.cn/ruihan/runaway/raw/branch/main/.github/runaway.gpg"
|
||||
|
||||
import_gpg_key() {
|
||||
local tmp_key
|
||||
@@ -36,8 +36,8 @@ do_self_update() {
|
||||
error_exit "curl required for update"
|
||||
fi
|
||||
|
||||
local repo="mateussiqueira/runaway"
|
||||
local api_url="https://api.github.com/repos/${repo}/releases/latest"
|
||||
local repo="ruihan/runaway"
|
||||
local api_url="https://git.jskdjs.cn/api/v1/repos/${repo}/releases/latest"
|
||||
local tmp_dir
|
||||
tmp_dir=$(mktemp -d)
|
||||
|
||||
@@ -63,7 +63,7 @@ do_self_update() {
|
||||
info "Updating from v$VERSION to v$latest_tag..."
|
||||
|
||||
begin "Downloading latest runaway"
|
||||
local dl_url="https://raw.githubusercontent.com/${repo}/main/runaway"
|
||||
local dl_url="https://git.jskdjs.cn/${repo}/raw/branch/main/runaway"
|
||||
local sig_url="${dl_url}.sig"
|
||||
local tmp="$tmp_dir/runaway"
|
||||
local sig_tmp="$tmp_dir/runaway.sig"
|
||||
|
||||
+3
-8
@@ -24,12 +24,7 @@ telemetry_is_enabled() {
|
||||
|
||||
telemetry_send() {
|
||||
telemetry_is_enabled || return 0
|
||||
local event="$1"
|
||||
local data="${2:-{}}"
|
||||
local url="https://runaway-telemetry.mateussiqueira.workers.dev/event"
|
||||
local payload
|
||||
payload=$(printf '{"event":"%s","version":"%s","arch":"%s","os":"%s","data":%s}' \
|
||||
"$event" "$VERSION" "$(uname -m)" "$(uname -s)" "$data")
|
||||
curl -s -o /dev/null -w "" -H "Content-Type: application/json" \
|
||||
-d "$payload" "$url" 2>/dev/null || true
|
||||
# Upstream telemetry collector removed in this fork; nothing is sent.
|
||||
# Kept as a no-op so opt-in state and call sites keep working.
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user