feat(desktop): version source-of-truth + RPM + AppImage packaging
Phase 1+2 of multi-platform distribution plan:
- gradle/libs.versions.toml: add `app = "1.08.0"` as single source of truth
- Root build.gradle: allprojects { version = libs.versions.app.get() }
- amethyst/build.gradle: versionName from catalog (versionCode stays local)
- desktopApp/build.gradle.kts: drop hardcoded "1.0.0"; inherit project.version;
add TargetFormat.Rpm; add linux DSL (menuGroup, appCategory, debMaintainer,
rpmLicenseType, rpmPackageVersion with dashes stripped)
- desktopApp/build.gradle.kts: new createReleaseAppImage task wrapping
createReleaseDistributable with linuxdeploy (TargetFormat.AppImage is
broken in Compose 1.10.x — CMP-7101)
- packaging/appimage/: AppRun launcher (sets LD_LIBRARY_PATH for bundled VLC),
amethyst.desktop XDG entry, 512x512 icon extracted from icon.icns
- scripts/asset-name.sh: single source for release asset naming contract
This commit is contained in:
Executable
+66
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env bash
|
||||
# Single source of truth for Amethyst Desktop release asset naming.
|
||||
#
|
||||
# Contract: amethyst-desktop-<version>-<family>-<arch>.<ext>
|
||||
# <version> = tag stripped of leading 'v' (e.g. "1.08.0")
|
||||
# <family> = macos | windows | linux
|
||||
# <arch> = x64 | arm64
|
||||
# <ext> = dmg | msi | zip | deb | rpm | AppImage | tar.gz
|
||||
#
|
||||
# Consumed by: .github/workflows/create-release.yml, .github/workflows/bump-*.yml,
|
||||
# BUILDING.md, local release runbooks.
|
||||
#
|
||||
# Usage:
|
||||
# source scripts/asset-name.sh
|
||||
# collect_assets <family> <arch> <version> <dest_dir>
|
||||
#
|
||||
# Expected examples:
|
||||
# amethyst-desktop-1.08.0-macos-x64.dmg
|
||||
# amethyst-desktop-1.08.0-macos-arm64.dmg
|
||||
# amethyst-desktop-1.08.0-windows-x64.msi
|
||||
# amethyst-desktop-1.08.0-windows-x64.zip
|
||||
# amethyst-desktop-1.08.0-linux-x64.deb
|
||||
# amethyst-desktop-1.08.0-linux-x64.rpm
|
||||
# amethyst-desktop-1.08.0-linux-x64.AppImage
|
||||
# amethyst-desktop-1.08.0-linux-x64.tar.gz
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Print the canonical asset filename for a given family/arch/version/extension.
|
||||
# Usage: asset_name <family> <arch> <version> <ext>
|
||||
asset_name() {
|
||||
local family="$1" arch="$2" version="$3" ext="$4"
|
||||
printf 'amethyst-desktop-%s-%s-%s.%s' "$version" "$family" "$arch" "$ext"
|
||||
}
|
||||
|
||||
# Copy + rename build outputs into <dest_dir> using the canonical naming scheme.
|
||||
# Usage: collect_assets <family> <arch> <version> <dest_dir>
|
||||
# Expects build outputs under desktopApp/build/... (Compose binaries + custom tasks + portable archives).
|
||||
collect_assets() {
|
||||
local family="$1" arch="$2" version="$3" dest="$4"
|
||||
mkdir -p "$dest"
|
||||
shopt -s nullglob
|
||||
|
||||
# Compose Desktop jpackage outputs (main-release/<format>/*.ext)
|
||||
local src ext base dst
|
||||
for src in \
|
||||
desktopApp/build/compose/binaries/main-release/dmg/*.dmg \
|
||||
desktopApp/build/compose/binaries/main-release/msi/*.msi \
|
||||
desktopApp/build/compose/binaries/main-release/deb/*.deb \
|
||||
desktopApp/build/compose/binaries/main-release/rpm/*.rpm \
|
||||
desktopApp/build/appimage/*.AppImage \
|
||||
desktopApp/build/portable/*.tar.gz \
|
||||
desktopApp/build/portable/*.zip \
|
||||
; do
|
||||
[ -f "$src" ] || continue
|
||||
base="$(basename "$src")"
|
||||
case "$base" in
|
||||
*.tar.gz) ext="tar.gz" ;;
|
||||
*) ext="${base##*.}" ;;
|
||||
esac
|
||||
dst="$dest/$(asset_name "$family" "$arch" "$version" "$ext")"
|
||||
cp "$src" "$dst"
|
||||
echo "Collected: $dst"
|
||||
done
|
||||
shopt -u nullglob
|
||||
}
|
||||
Reference in New Issue
Block a user