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:
18
scripts/lib/release-version.sh
Normal file
18
scripts/lib/release-version.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
# release-version.sh — the version every published build carries.
|
||||
#
|
||||
# SOURCE this from the repo root. It sets:
|
||||
#
|
||||
# release_count commits on HEAD; only ever goes up on main
|
||||
# release_version <major>.<minor>.<release_count>, e.g. 0.1.47
|
||||
# release_dirty true when tracked files have uncommitted changes
|
||||
#
|
||||
# Major and minor come from tauri.conf.json; the patch is the commit count, so
|
||||
# any commit can ship without a manual bump, and the number is plain enough for
|
||||
# every package format (Android versionCode, RPM, MSI, semver).
|
||||
|
||||
release_count="$(git rev-list --count HEAD)"
|
||||
release_version="$(node -p "require('./src-tauri/tauri.conf.json').version.split('.').slice(0, 2).join('.')").$release_count"
|
||||
release_dirty=false
|
||||
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
|
||||
release_dirty=true
|
||||
fi
|
||||
Reference in New Issue
Block a user