added Twitter Pico

- Remove rufusin patch because pj merged with anddea
- Improve ci function
This commit is contained in:
siritami
2024-03-17 17:56:43 +07:00
parent e503ee663a
commit 36d760e17c
13 changed files with 124 additions and 105 deletions

View File

@@ -5,13 +5,13 @@ get_date() {
json=$(wget -qO- "https://api.github.com/repos/$1/releases")
case "$2" in
latest)
updated_at=$(echo "$json" | jq -r 'first(.[] | select(.prerelease == false) | .assets[] | select(.name == "'$3'") | .updated_at)')
updated_at=$(echo "$json" | jq -r 'first(.[] | select(.prerelease == false) | .assets[] | select(.name | test("'$3'")) | .updated_at)')
;;
prerelease)
updated_at=$(echo "$json" | jq -r 'first(.[] | select(.prerelease == true) | .assets[] | select(.name == "'$3'") | .updated_at)')
updated_at=$(echo "$json" | jq -r 'first(.[] | select(.prerelease == true) | .assets[] | select(.name | test("'$3'")) | .updated_at)')
;;
*)
updated_at=$(echo "$json" | jq -r 'first(.[] | select(.tag_name == "'$2'") | .assets[] | select(.name == "'$3'") | .updated_at)')
updated_at=$(echo "$json" | jq -r 'first(.[] | select(.tag_name == "'$2'") | .assets[] | select(.name | test("'$3'")) | .updated_at)')
;;
esac
echo "$updated_at"
@@ -19,7 +19,7 @@ get_date() {
checker(){
local date1 date2 date1_sec date1_sec repo=$1 ur_repo=$repository check=$3
date1=$(get_date "$repo" "$2" "patches.json")
date1=$(get_date "$repo" "$2" "^.*\\\.jar$")
date2=$(get_date "$ur_repo" "all" "$check")
date1_sec=$(date -d "$date1" +%s)
date2_sec=$(date -d "$date2" +%s)