🐛 fix: handle space after colon in GitHub API JSON tag_name field
This commit is contained in:
parent
a8f88e852c
commit
4263f0379d
@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
|
## [0.8.2] - 2026-03-01
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- `install.sh`: grep pattern for `tag_name` now handles the space GitHub includes after the colon in JSON (`"tag_name": "x"` instead of `"tag_name":"x"`)
|
||||||
|
|
||||||
## [0.8.1] - 2026-03-01
|
## [0.8.1] - 2026-03-01
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tmuxido"
|
name = "tmuxido"
|
||||||
version = "0.8.1"
|
version = "0.8.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|||||||
@ -19,7 +19,7 @@ esac
|
|||||||
api_resp=$(curl -sSL \
|
api_resp=$(curl -sSL \
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
"$API_URL/repos/$REPO/releases/latest")
|
"$API_URL/repos/$REPO/releases/latest")
|
||||||
tag=$(printf '%s' "$api_resp" | grep -o '"tag_name":"[^"]*"' | cut -d'"' -f4)
|
tag=$(printf '%s' "$api_resp" | grep -o '"tag_name": *"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"')
|
||||||
|
|
||||||
if [ -z "$tag" ]; then
|
if [ -z "$tag" ]; then
|
||||||
echo "Could not fetch latest release." >&2
|
echo "Could not fetch latest release." >&2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user