diff --git a/app/flatpak-builtins-build-import-bundle.c b/app/flatpak-builtins-build-import-bundle.c
index 5f9b3e14..2bd287f1 100644
--- a/app/flatpak-builtins-build-import-bundle.c
+++ b/app/flatpak-builtins-build-import-bundle.c
@@ -34,10 +34,16 @@
static char *opt_ref;
static gboolean opt_oci = FALSE;
+static char **opt_gpg_key_ids;
+static char *opt_gpg_homedir;
+static gboolean opt_update_appstream;
static GOptionEntry options[] = {
{ "ref", 0, 0, G_OPTION_ARG_STRING, &opt_ref, N_("Override the ref used for the imported bundle"), N_("REF") },
{ "oci", 0, 0, G_OPTION_ARG_NONE, &opt_oci, N_("Import oci image instead of flatpak bundle"), NULL },
+ { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_gpg_key_ids, N_("GPG Key ID to sign the commit with"), N_("KEY-ID") },
+ { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, N_("GPG Homedir to use when looking for keyrings"), N_("HOMEDIR") },
+ { "update-appstream", 0, 0, G_OPTION_ARG_NONE, &opt_update_appstream, N_("Update the appstream branch"), NULL },
{ NULL }
};
@@ -303,7 +309,7 @@ flatpak_builtin_build_import (int argc, char **argv, GCancellable *cancellable,
if (!ostree_repo_open (repo, cancellable, error))
return FALSE;
-if (opt_oci)
+ if (opt_oci)
{
if (!import_oci (repo, file, cancellable, error))
return FALSE;
@@ -314,6 +320,17 @@ if (opt_oci)
return FALSE;
}
+ if (opt_update_appstream &&
+ !flatpak_repo_generate_appstream (repo, (const char **) opt_gpg_key_ids, opt_gpg_homedir, cancellable, error))
+ return FALSE;
+
+ if (!flatpak_repo_update (repo,
+ (const char **) opt_gpg_key_ids,
+ opt_gpg_homedir,
+ cancellable,
+ error))
+ return FALSE;
+
return TRUE;
}
diff --git a/doc/flatpak-build-import-bundle.xml b/doc/flatpak-build-import-bundle.xml
index 1b221f1f..703c22a0 100644
--- a/doc/flatpak-build-import-bundle.xml
+++ b/doc/flatpak-build-import-bundle.xml
@@ -89,6 +89,31 @@
+
+
+
+
+ Run appstream-builder and to update the appstream branch after build.
+
+
+
+
+
+
+
+ Sign the commit with this GPG key.
+ This option can be used multiple times.
+
+
+
+
+
+
+
+ GPG Homedir to use when looking for keyrings
+
+
+