Publish desktop releases to a self-hosted dnf repo
scripts/rpm-publish.sh builds the RPM, signs it and the repo metadata with a dedicated GPG key, and adds it to a dnf repo in a given directory, keeping the newest three versions for downgrades. The directory holds nothing secret, so it can be served as is. Both publish scripts now share the version scheme in scripts/lib/release-version.sh: <major>.<minor>.<commit count>, plain enough for RPM, MSI and semver alike. Android's versionCode stays the commit count. Fixes the publish scripts failing under set -u when the repo URL variable isn't set, which is every run after the first. tauri.conf.json now declares the license and homepage for the package metadata.
This commit is contained in:
@@ -108,10 +108,10 @@ fi
|
||||
# The versionCode is the commit count, so every commit on main can ship with no
|
||||
# manual bump and F-Droid sees each one as newer than the last.
|
||||
|
||||
version_code="$(git rev-list --count HEAD)"
|
||||
base_version="$(node -p "require('./src-tauri/tauri.conf.json').version")"
|
||||
version_name="$base_version-$version_code-g$(git rev-parse --short HEAD)"
|
||||
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
|
||||
source scripts/lib/release-version.sh
|
||||
version_code="$release_count"
|
||||
version_name="$release_version"
|
||||
if $release_dirty; then
|
||||
if ! $allow_dirty; then
|
||||
err "the working tree has uncommitted changes; commit them or pass --allow-dirty"
|
||||
exit 1
|
||||
@@ -121,7 +121,8 @@ fi
|
||||
|
||||
# --- 4. The repo, the first time --------------------------------------------
|
||||
|
||||
repo_url="${FDROID_REPO_URL%/}"
|
||||
repo_url="${FDROID_REPO_URL:-}"
|
||||
repo_url="${repo_url%/}"
|
||||
case "$repo_url" in
|
||||
"" | */repo) ;;
|
||||
*) err "FDROID_REPO_URL must end in /repo (fdroidserver requires it), e.g. $repo_url/repo"; exit 1 ;;
|
||||
|
||||
Reference in New Issue
Block a user