gnucash-on-flatpak master: Create a flatpakrepo file for easier installation of the nightlies repo
Geert Janssens
gjanssens at code.gnucash.org
Tue Aug 20 13:27:01 EDT 2019
Updated via https://github.com/Gnucash/gnucash-on-flatpak/commit/7cc0dbb3 (commit)
from https://github.com/Gnucash/gnucash-on-flatpak/commit/293284ec (commit)
commit 7cc0dbb308edfe693ac0c50bf6d1af91f6af9ac2
Author: Geert Janssens <geert at kobaltwit.be>
Date: Tue Aug 20 19:26:55 2019 +0200
Create a flatpakrepo file for easier installation of the nightlies repo
diff --git a/build_package.sh b/build_package.sh
index d5f1e17..e39df96 100755
--- a/build_package.sh
+++ b/build_package.sh
@@ -118,6 +118,8 @@ prepare_gpg
create_manifest
# Create the flatpakref file
create_flatpakref
+# Create the flatpakrepo file
+create_flatpakrepo
# Prepare build environment by installing the correct sdk
setup_sdk
@@ -144,6 +146,14 @@ then
create_remote_dir "$host"/$remote_branch_dir
rsync -a "$fp_ref_dir_local"/$fp_ref_file "$host"/$remote_branch_dir
fi
+
+ # Upload the flatpakrepo file if we created one
+ if [[ -n "$fp_repo_file" ]]
+ then
+ echo "Uploading flatpakref file '$fp_repo_file'"
+ create_remote_dir "$host"
+ rsync -a "$fp_repo_dir_local"/$fp_repo_file "$host"
+ fi
fi
upload_build_log
diff --git a/functions.sh b/functions.sh
index 2151361..2194c16 100644
--- a/functions.sh
+++ b/functions.sh
@@ -202,3 +202,21 @@ function create_flatpakref()
fp_ref_file=""
fi
}
+
+function create_flatpakrepo()
+{
+ fp_repo_file=gnucash-nightlies.flatpakrepo
+ if [[ -n "$host_public" ]] || [[ -n "$gpg_key" ]]
+ then
+ echo "Writing $fp_repo_file"
+ fp_repo_dir_local="$base_dir"/flatpakrefs
+ mkdir -p "$fp_repo_dir_local"
+ cp "$fp_git_dir"/templates/gnucash-nightlies.flatpakrepo.tpl "$fp_repo_dir_local"/$fp_repo_file
+ echo "Url=$host_public/$fp_repo" >> "$fp_repo_dir_local"/$fp_repo_file
+ echo "GPGKey=$gpg_key64" >> "$fp_repo_dir_local"/$fp_repo_file
+ else
+ echo "Mandatory variable 'host_public' or 'gpg_key' is not set."
+ echo "Skipping generation of $fp_repo_file"
+ fp_repo_file=""
+ fi
+}
diff --git a/templates/gnucash-nightlies.flatpakrepo.tpl b/templates/gnucash-nightlies.flatpakrepo.tpl
new file mode 100644
index 0000000..33c5b4c
--- /dev/null
+++ b/templates/gnucash-nightlies.flatpakrepo.tpl
@@ -0,0 +1,6 @@
+[Flatpak Repo]
+Title=GnuCash Nightlies
+Homepage=https://gnucash.org/
+Comment=Repository for GnuCash nightly builds
+Description=Repository for GnuCash nightly builds
+Icon=https://raw.githubusercontent.com/Gnucash/gnucash/3.6/data/pixmaps/hicolor/scalable/apps/gnucash-icon.svg
Summary of changes:
build_package.sh | 10 ++++++++++
functions.sh | 18 ++++++++++++++++++
templates/gnucash-nightlies.flatpakrepo.tpl | 6 ++++++
3 files changed, 34 insertions(+)
create mode 100644 templates/gnucash-nightlies.flatpakrepo.tpl
More information about the gnucash-changes
mailing list