[gnome-contacts/wip/nielsdg/devel-app-id] ci: Use the nigtly flatpak template
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/nielsdg/devel-app-id] ci: Use the nigtly flatpak template
- Date: Sun, 5 Jan 2020 23:05:41 +0000 (UTC)
commit 543999ff4375ace548c227440e6d59e4be97b7ed
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sun Jan 5 22:52:02 2020 +0100
ci: Use the nigtly flatpak template
We lose the JUnit report integration, but that's a small disadvantage
compared to the advantages we get instead.
.gitlab-ci.yml | 43 ++++++++--------------
data/flatpak/org.gnome.Contacts.json | 2 +-
data/meson.build | 30 +++++++++++----
data/org.gnome.Contacts.SearchProvider.service.in | 2 +-
...xml.in => org.gnome.Contacts.appdata.xml.in.in} | 2 +-
...i => org.gnome.Contacts.search-provider.ini.in} | 4 +-
data/org.gnome.Contacts.service.in | 2 +-
po/POTFILES.in | 2 +-
src/contacts-shell-search-provider.vala | 2 +-
9 files changed, 45 insertions(+), 44 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index db84f03..19a11a4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,31 +1,18 @@
+include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
+
stages:
- - build-flatpak
+- test
+- deploy
+
+variables:
+ BUNDLE: 'gnome-contacts.flatpak'
-# We always use flatpak-builder to check if everything still works.
-flatpak:master:
+flatpak:
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
- stage: build-flatpak
- script:
- - flatpak-builder --stop-at=gnome-contacts app data/flatpak/org.gnome.Contacts.json
- # Make sure to keep this in sync with the Flatpak manifest, all arguments
- # are passed except the config-args because we build it ourselves
- - flatpak build app meson --prefix=/app _build
- - flatpak build app ninja -C _build test
- - flatpak build app ninja -C _build install
- - flatpak-builder --finish-only --repo=repo app data/flatpak/org.gnome.Contacts.json
- # Make a Flatpak Contacts bundle for people to test
- - flatpak build-bundle repo contacts-dev.flatpak
--runtime-repo=https://sdk.gnome.org/gnome-nightly.flatpakrepo org.gnome.Contacts
- # Run the tests
- - bash +x ./.gitlab-ci/run-tests.sh
- artifacts:
- reports:
- junit: "_build/${CI_JOB_NAME}-report.xml"
- name: "gnome-contacts-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
- when: always
- paths:
- - contacts-dev.flatpak
- - _build/meson-logs/
- expire_in: 14 days
- cache:
- paths:
- - .flatpak-builder/cache
+ variables:
+ MANIFEST_PATH: 'data/flatpak/org.gnome.Contacts.json'
+ MESON_ARGS: "-Dprofile=development"
+ FLATPAK_MODULE: "gnome-contacts"
+ RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
+ APP_ID: "org.gnome.Contacts.Devel"
+ extends: .flatpak
diff --git a/data/flatpak/org.gnome.Contacts.json b/data/flatpak/org.gnome.Contacts.json
index 0e1501e..654a9d3 100644
--- a/data/flatpak/org.gnome.Contacts.json
+++ b/data/flatpak/org.gnome.Contacts.json
@@ -1,5 +1,5 @@
{
- "app-id": "org.gnome.Contacts",
+ "app-id": "org.gnome.Contacts.Devel",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
diff --git a/data/meson.build b/data/meson.build
index f075b62..2b831cc 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -39,8 +39,14 @@ endif
# The appdata file
appdata_file = i18n.merge_file(
- input: 'org.gnome.Contacts.appdata.xml.in',
- output: 'org.gnome.Contacts.appdata.xml',
+ input: configure_file(
+ input: 'org.gnome.Contacts.appdata.xml.in.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'app_id': contacts_app_id,
+ },
+ ),
+ output: '@0 appdata xml'.format(contacts_app_id),
type: 'xml',
po_dir: po_dir,
install: true,
@@ -58,14 +64,16 @@ if appstream_util.found()
endif
# DBus service files
-service_config = configuration_data()
-service_config.set('bindir', contacts_prefix / get_option('bindir'))
-service_config.set('libexecdir', contacts_prefix / get_option('libexecdir'))
+service_config = {
+ 'app_id': contacts_app_id,
+ 'bindir': contacts_prefix / get_option('bindir'),
+ 'libexecdir': contacts_prefix / get_option('libexecdir'),
+}
# The DBUS service file of the app
configure_file(
input: 'org.gnome.Contacts.service.in',
- output: '@BASENAME@',
+ output: '@0@.service'.format(contacts_app_id),
configuration: service_config,
install: true,
install_dir: get_option('datadir') / 'dbus-1' / 'services',
@@ -74,13 +82,19 @@ configure_file(
# The DBUS service file of the search provider
configure_file(
input: 'org.gnome.Contacts.SearchProvider.service.in',
- output: '@BASENAME@',
+ output: '@0@.SearchProvider.service'.format(contacts_app_id),
configuration: service_config,
install: true,
install_dir: get_option('datadir') / 'dbus-1' / 'services',
)
# The search provider file
-install_data('org.gnome.Contacts.search-provider.ini',
+configure_file(
+ input: 'org.gnome.Contacts.search-provider.ini.in',
+ output: '@0 search-provider ini'.format(contacts_app_id),
+ configuration: {
+ 'app_id': contacts_app_id,
+ },
+ install: true,
install_dir: get_option('datadir') / 'gnome-shell' / 'search-providers',
)
diff --git a/data/org.gnome.Contacts.SearchProvider.service.in
b/data/org.gnome.Contacts.SearchProvider.service.in
index 6f45237..9503bbd 100644
--- a/data/org.gnome.Contacts.SearchProvider.service.in
+++ b/data/org.gnome.Contacts.SearchProvider.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.gnome.Contacts.SearchProvider
+Name=@app_id@.SearchProvider
Exec=@libexecdir@/gnome-contacts-search-provider
diff --git a/data/org.gnome.Contacts.appdata.xml.in b/data/org.gnome.Contacts.appdata.xml.in.in
similarity index 99%
rename from data/org.gnome.Contacts.appdata.xml.in
rename to data/org.gnome.Contacts.appdata.xml.in.in
index 72a1c2e..7893a7d 100644
--- a/data/org.gnome.Contacts.appdata.xml.in
+++ b/data/org.gnome.Contacts.appdata.xml.in.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
- <id>org.gnome.Contacts.desktop</id>
+ <id>@app_id@.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<name>Contacts</name>
diff --git a/data/org.gnome.Contacts.search-provider.ini b/data/org.gnome.Contacts.search-provider.ini.in
similarity index 50%
rename from data/org.gnome.Contacts.search-provider.ini
rename to data/org.gnome.Contacts.search-provider.ini.in
index fc521d3..280cde7 100644
--- a/data/org.gnome.Contacts.search-provider.ini
+++ b/data/org.gnome.Contacts.search-provider.ini.in
@@ -1,5 +1,5 @@
[Shell Search Provider]
-DesktopId=org.gnome.Contacts.desktop
-BusName=org.gnome.Contacts.SearchProvider
+DesktopId=@app_id@.desktop
+BusName=@app_id@.SearchProvider
ObjectPath=/org/gnome/Contacts/SearchProvider
Version=2
diff --git a/data/org.gnome.Contacts.service.in b/data/org.gnome.Contacts.service.in
index 1effe62..3bcb2fa 100644
--- a/data/org.gnome.Contacts.service.in
+++ b/data/org.gnome.Contacts.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.gnome.Contacts
+Name=@app_id@
Exec=@bindir@/gnome-contacts --gapplication-service
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f42cb90..cdf6d09 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,6 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-data/org.gnome.Contacts.appdata.xml.in
+data/org.gnome.Contacts.appdata.xml.in.in
data/org.gnome.Contacts.desktop.in.in
data/gtk/help-overlay.ui
data/ui/contacts-accounts-list.ui
diff --git a/src/contacts-shell-search-provider.vala b/src/contacts-shell-search-provider.vala
index 7465d56..ad96732 100644
--- a/src/contacts-shell-search-provider.vala
+++ b/src/contacts-shell-search-provider.vala
@@ -172,7 +172,7 @@ public class Contacts.SearchProvider : Object {
public class Contacts.SearchProviderApp : GLib.Application {
public SearchProviderApp () {
- Object (application_id: "org.gnome.Contacts.SearchProvider",
+ Object (application_id: Config.APP_ID + ".SearchProvider",
flags: ApplicationFlags.IS_SERVICE,
inactivity_timeout: 10000);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]