From 94d11e805af51ebc0efed5b3fd6bf3d12d3aebad Mon Sep 17 00:00:00 2001 From: syui Date: Sun, 23 Feb 2025 16:26:40 +0900 Subject: [PATCH] fix pds version --- scpt/src/func.zsh | 24 ++++++++++++++++++------ scpt/src/tag.zsh | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/scpt/src/func.zsh b/scpt/src/func.zsh index 2134260..ca54a1d 100644 --- a/scpt/src/func.zsh +++ b/scpt/src/func.zsh @@ -27,13 +27,25 @@ function at-unset() { unset t password token refresh } -function at-version() { +function at-version-json() { latest=`curl -sL https://raw.githubusercontent.com/bluesky-social/atproto/refs/heads/main/packages/pds/package.json |jq -r .version` - echo latest: $latest - echo $host - curl -sL ${host}/xrpc/_health |jq . - echo syu.is - curl -sL syu.is/xrpc/_health |jq . + echo "[" + echo "{\"latest\":\"$latest\"}," + e=${pds_list[@]: -1} + echo "[" + for i in $pds_list; do + t=`curl -sL ${i}/xrpc/_health |jq -r .version` + echo "{\"$i\":\"$t\"}" + if [ "$e" != "$i" ];then + echo , + fi + done + echo "]" + echo "]" +} + +function at-version() { + at-version-json |jq . } function at-uri() { diff --git a/scpt/src/tag.zsh b/scpt/src/tag.zsh index 7335968..d0ae367 100644 --- a/scpt/src/tag.zsh +++ b/scpt/src/tag.zsh @@ -37,3 +37,4 @@ github=( https://github.com/did-method-plc/did-method-plc ) tag=( at bsky bsync pds bgs plc ozone feed jetstream social-app oauth ) +pds_list=(bsky.social syu.is boobee.blue socl.is )