Skip to content

Commit

Permalink
[skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhotio committed Feb 7, 2024
1 parent daaad2b commit 7b2c94b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
19 changes: 9 additions & 10 deletions VERSION.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"latest": true,
"description": "Releases",
"version": "4.6.3",
"full_version": "release-4.6.3_v1.2.19",
"vuetorrent_version": "2.6.0",
"changelog": "https://github.com/qbittorrent/qbittorrent/compare/release-4.6.2...release-4.6.3",
"upstream_image": "ghcr.io/hotio/base",
"upstream_tag": "alpinevpn",
"upstream_digest_amd64": "sha256:cfee33d5f5c24786c2f8913e848513c62b9c0fb06cbb86fb97118718938e7ceb",
"upstream_digest_arm64": "sha256:5187c6bc4300e2dab15540733d1e0d1ac8fb8e289472bb5221ff42bc7d38aa2a",
"test_url": "http://localhost:8080",
"latest": true,
"nightwalker_version": "2301b1cc436d802abe1e2cb6f132dff12e40157b",
"test_amd64": true,
"test_arm64": true,
"nightwalker_version": "2301b1cc436d802abe1e2cb6f132dff12e40157b"
"test_url": "http://localhost:8080",
"upstream_digest_amd64": "sha256:cfee33d5f5c24786c2f8913e848513c62b9c0fb06cbb86fb97118718938e7ceb",
"upstream_digest_arm64": "sha256:5187c6bc4300e2dab15540733d1e0d1ac8fb8e289472bb5221ff42bc7d38aa2a",
"upstream_image": "ghcr.io/hotio/base",
"upstream_tag": "alpinevpn",
"version": "4.6.3",
"vuetorrent_version": "v2.6.0"
}
25 changes: 12 additions & 13 deletions update-versions.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/bin/bash

nightwalker_version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://api.github.com/repos/CallMeBruce/nightwalker/commits/main" | jq -r .sha)
[[ -z ${nightwalker_version} ]] && exit 0
vuetorrent_version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://api.github.com/repos/vuetorrent/vuetorrent/releases/latest" | jq -r .tag_name | sed s/v//g)
[[ -z ${vuetorrent_version} ]] && exit 0
full_version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/latest/download/dependency-version.json" | jq -r '. | "release-\(.qbittorrent)_v\(.libtorrent_1_2)"')
version=$(echo "${full_version}" | sed -e "s/release-//g" -e "s/_.*//g")
[[ -z ${version} ]] && exit 0
old_version=$(jq -r '.version' < VERSION.json)
changelog=$(jq -r '.changelog' < VERSION.json)
[[ "${old_version}" != "${version}" ]] && changelog="https://github.com/qbittorrent/qbittorrent/compare/release-${old_version}...release-${version}"
version_json=$(cat ./VERSION.json)
jq '.version = "'"${version}"'" | .full_version = "'"${full_version}"'" | .vuetorrent_version = "'"${vuetorrent_version}"'" | .nightwalker_version = "'"${nightwalker_version}"'" | .changelog = "'"${changelog}"'"' <<< "${version_json}" > VERSION.json
set -e
nightwalker_version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://api.github.com/repos/CallMeBruce/nightwalker/commits/main" | jq -re .sha)
vuetorrent_version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://api.github.com/repos/vuetorrent/vuetorrent/releases/latest" | jq -re .tag_name)
full_version=$(curl -u "${GITHUB_ACTOR}:${GITHUB_TOKEN}" -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/latest/download/dependency-version.json" | jq -re '. | "release-\(.qbittorrent)_v\(.libtorrent_1_2)"')
version=$(sed -e "s/release-//g" -e "s/_.*//g" <<< "${full_version}")
json=$(cat VERSION.json)
jq --sort-keys \
--arg version "${version//v/}" \
--arg full_version "${full_version}" \
--arg vuetorrent_version "${vuetorrent_version}" \
--arg nightwalker_version "${nightwalker_version}" \
'.version = $version | .full_version = $full_version | .vuetorrent_version = $vuetorrent_version | .nightwalker_version = $nightwalker_version' <<< "${json}" | tee VERSION.json

0 comments on commit 7b2c94b

Please sign in to comment.