concat, concat-bin, concat-git: follow the 0.2.1 rewrite; fluxer-bin: stay on stable
This commit is contained in:
1 parent
97de80f1c2
commit
0dd9d17cf4
12 files changed
+326
-310
No files matched your search
+26
-2
@@ -3,14 +3,38 @@
|
||||
# Upstream hosts versioned prebuilt binaries itself, so there is no
|
||||
# build_artifact() here: on a new version only pkgver and the checksums
|
||||
# are refreshed and the result is pushed to the AUR.
|
||||
#
|
||||
# The download API has one URL shape per channel, and this package follows
|
||||
# "stable". Its /latest currently 302s into the canary channel - upstream has
|
||||
# published nothing to stable since 0.0.8, and the pointer falls through to
|
||||
# the channel that is moving. A canary build is a nightly, not what a package
|
||||
# called fluxer-bin ships, so latest_version() recognises the fall-through
|
||||
# and reports EX_TEMPFAIL instead of a version; see below.
|
||||
|
||||
DL_BASE="https://api.fluxer.app/dl/desktop/stable/linux"
|
||||
|
||||
latest_version() {
|
||||
local name ver
|
||||
|
||||
# the download API exposes the current version in the attachment filename,
|
||||
# e.g. content-disposition: attachment; filename="fluxer-stable-0.0.8-x64.tar.gz"
|
||||
curl -sfI "$DL_BASE/x64/latest/tar_gz" \
|
||||
| grep -oiP 'filename="fluxer-(stable-)?\K[0-9][^"]*(?=-x64\.tar\.gz)'
|
||||
#
|
||||
# -L, and the last filename of the chain: when the stable channel has no
|
||||
# current build the request is redirected to another channel, and the
|
||||
# filename it answers with is how that becomes visible here.
|
||||
name="$(curl -sfIL "$DL_BASE/x64/latest/tar_gz" \
|
||||
| grep -oiP 'filename="\K[^"]+' | tail -n1)"
|
||||
|
||||
ver="$(grep -oiP '^fluxer-(stable-)?\K[0-9][^"]*(?=-x64\.tar\.gz$)' <<< "$name" \
|
||||
|| true)"
|
||||
if [[ -z "$ver" ]]; then
|
||||
# e.g. Fluxer-Canary-2026.904.135113-linux-x64.tar.gz - the canary channel
|
||||
echo "the stable channel's latest download is \"$name\", which is not a" \
|
||||
"stable build - nothing to update to" >&2
|
||||
return 75
|
||||
fi
|
||||
|
||||
printf '%s\n' "$ver"
|
||||
}
|
||||
|
||||
# refresh_checksums <version> <pkgbuild-path>
|
||||
|
||||
Reference in new issue
Block a user