generated from MrSphay/codex-agent-repository-kit
Parse Gitea release id as JSON
All checks were successful
Build MrTrust / build (push) Successful in 4m20s
All checks were successful
Build MrTrust / build (push) Successful in 4m20s
This commit is contained in:
@@ -67,7 +67,7 @@ jobs:
|
|||||||
version="0.1.2"
|
version="0.1.2"
|
||||||
api="https://git.wilkensxl.de/api/v1/repos/MrSphay/MrTrust"
|
api="https://git.wilkensxl.de/api/v1/repos/MrSphay/MrTrust"
|
||||||
release_json="$(curl -fsS -H "Authorization: token ${GITEA_TOKEN}" "${api}/releases/tags/v${version}")"
|
release_json="$(curl -fsS -H "Authorization: token ${GITEA_TOKEN}" "${api}/releases/tags/v${version}")"
|
||||||
release_id="$(printf '%s' "$release_json" | sed -n 's/.*"id":\([0-9][0-9]*\).*/\1/p' | head -n 1)"
|
release_id="$(printf '%s' "$release_json" | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')"
|
||||||
if [ -z "$release_id" ]; then
|
if [ -z "$release_id" ]; then
|
||||||
echo "Could not resolve release id for v${version}" >&2
|
echo "Could not resolve release id for v${version}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user