concat, concat-bin, concat-git: follow the 0.2.1 rewrite; fluxer-bin: stay on stable

This commit is contained in:
Felitendo committed 2026-09-06 13:43:34 +02:00
1 parent 97de80f1c2
commit 0dd9d17cf4
12 files changed
+326 -310

No files matched your search

+37 -32
View File
@@ -1,35 +1,37 @@
# concat-bin - Concat (https://github.com/jub0t/Concat), a free and
# open-source CapCut replacement: a Tauri 2 shell around a Rust video engine.
# open-source CapCut replacement.
#
# Upstream publishes a Linux .deb per release, so there is no build step
# here: on a new version only pkgver, the asset name and the checksums are
# refreshed and the PKGBUILD repackages the .deb.
# Upstream publishes a self-contained Linux tarball per release, so there is
# no build step here: on a new version only pkgver, the asset name and the
# checksum are refreshed and the PKGBUILD repackages the tarball.
#
# The project has no stable release yet. Its build workflow publishes a
# "v<version>-alpha.<n>" prerelease for every green push to main, so /latest
# is empty and every tag is a prerelease - the alphas are what there is to
# package. They arrive several times a day, which is also how often this
# package can move.
# 0.2.1 is the first release of the rewrite: the Tauri shell and its .deb are
# gone, and the app is now one Rust binary (Slint over the engine crates)
# shipped as Concat-<version>-linux-<arch>.tar.gz. The tag is what changed
# least - see below.
#
# The release list is not ordered by version: GitHub sorts it by creation
# time, and upstream's alpha numbering has already run out of step with it
# (v0.2.0-alpha.10 sits between alpha.2 and alpha.1). The newest release is
# therefore picked by publication date rather than by list position.
# time, and upstream's alpha numbering has run out of step with it before
# (v0.2.0-alpha.10 sat between alpha.2 and alpha.1). The newest release is
# therefore picked by publication date rather than by list position. Only
# tags that start with a version are considered, which is also what keeps the
# rolling "nightly" prerelease out.
#
# The asset name carries tauri.conf.json's version, not the tag - every alpha
# of 0.2.0 ships WolfCut_0.2.0_amd64.deb - so it cannot be derived from
# pkgver and is resolved through the API into the _asset variable.
# The asset name carries the workspace's version, not the tag - a prerelease
# of 0.2.2 ships Concat-0.2.2-linux-x86_64.tar.gz whatever its tag says - so
# it cannot be derived from pkgver and is resolved through the API into the
# _asset variable.
#
# pkgver drops the hyphens from the tag (v0.2.0-alpha.15 -> 0.2.0alpha.15).
# pacman sorts that older than a later plain 0.2.0 (`vercmp 0.2.0alpha.15
# 0.2.0` is -1), so the prereleases upgrade to the eventual stable release on
# their own and no epoch is needed.
# pkgver drops the hyphens from the tag (v0.2.2-alpha.1 -> 0.2.2alpha.1).
# pacman sorts that older than a later plain 0.2.2 (`vercmp 0.2.2alpha.1
# 0.2.2` is -1), so prereleases upgrade to the eventual release on their own
# and no epoch is needed.
# Not on the AUR yet. concat-git goes up first; these two follow once the
# alpha-per-push release cadence has been lived with for a while - upstream
# publishes several a day, and each one is an AUR push (and, for concat, a
# full Rust build in CI). Flip this to true to publish; until then the
# PKGBUILD is still kept current and test-built here.
# release cadence has been lived with for a while - upstream published
# several alphas a day before 0.2.1, and each one is an AUR push (and, for
# concat, a full Rust build in CI). Flip this to true to publish; until then
# the PKGBUILD is still kept current and test-built here.
AUR_PUBLISH=false
UPSTREAM_REPO="jub0t/Concat"
@@ -52,7 +54,7 @@ latest_version() {
# refresh_checksums <version> <pkgbuild-path>
refresh_checksums() {
local ver="$1" pkgbuild="$2"
local tag asset sha_deb sha_license
local tag asset sha
tag="$(latest_tag)"
if [[ "$(tag_to_pkgver <<< "$tag")" != "$ver" ]]; then
@@ -60,20 +62,23 @@ refresh_checksums() {
return 1
fi
# e.g. WolfCut_0.2.0_amd64.deb - the version is tauri.conf.json's, not the tag's
# e.g. Concat-0.2.1-linux-x86_64.tar.gz - the version is the workspace's,
# not the tag's
# `|| true`, so that a release that stops carrying the asset says so here
# instead of ending the run on grep's exit status with nothing printed.
asset="$(gh api "repos/$UPSTREAM_REPO/releases/tags/$tag" --jq '.assets[].name' \
| grep -E '_amd64\.deb$')"
[[ "$(wc -l <<< "$asset")" -eq 1 ]] || { echo "expected exactly one amd64 .deb, got: $asset" >&2; return 1; }
| grep -E '^Concat-.*-linux-x86_64\.tar\.gz$' || true)"
if [[ -z "$asset" || "$(wc -l <<< "$asset")" -ne 1 ]]; then
echo "expected exactly one linux-x86_64 tarball in $tag, got: ${asset:-none}" >&2
return 1
fi
sha_deb="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/$tag/$asset" \
| sha256sum | cut -d' ' -f1)"
# the .deb ships no copyright file, so the license comes from the tag
sha_license="$(curl -sfL "https://raw.githubusercontent.com/$UPSTREAM_REPO/$tag/LICENSE" \
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/$tag/$asset" \
| sha256sum | cut -d' ' -f1)"
sed -i \
-e "s|^_tag=.*|_tag=\"$tag\"|" \
-e "s|^_asset=.*|_asset=\"$asset\"|" \
-e "s|^sha256sums=.*|sha256sums=('$sha_deb' '$sha_license')|" \
-e "s|^sha256sums=.*|sha256sums=('$sha')|" \
"$pkgbuild"
}