Commit 72732dd1 authored by Claudio André's avatar Claudio André
Browse files

CI: create a flatpak

The goal is dogfooding. Allow interested people to try, safely, the
bleeding GNOME Control Center.
parent fcc33b74
Pipeline #11615 passed with stages
in 3 minutes and 24 seconds
......@@ -2,6 +2,7 @@ image: claudioandre/settings:fedora.dev
stages:
- build
- test
- delivery
##
# Stage: Build
......@@ -62,3 +63,53 @@ test:
echo "== Testing =="
meson test -C _build --verbose --no-stdsplit
fi
##
# Stage: Delivery
#
# Create a flatpak
##
packaging:
stage: delivery
image: registry.gitlab.gnome.org/gnome/gnome-nightly-oci/nightly:master
artifacts:
name: package
paths:
- $(pwd)/*.flatpak
variables:
APPID: "org.gnome.SettingsDevel"
BUNDLE: "org.gnome.SettingsDevel.flatpak"
MANIFEST_PATH: "org.gnome.Settings.json"
PATCHES: "build-aux/flatpak/*.patch"
PROJECT_FILE: "build-aux/flatpak/org.gnome.Settings.json"
PROJECT_ID: "org.gnome.Settings"
PROJECT_NAME: "gnome-control-center.git"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
script:
- echo "== Flatpak packaging =="
# Move needed files to the root folder
- cp ${PROJECT_FILE} ${MANIFEST_PATH}
# Make it a develoment manifest
- sed -i -n "p; s/$PROJECT_NAME//p" ${MANIFEST_PATH}
- >
sed -i "s,\"app-id\" : \"$PROJECT_ID\",\"app-id\" : \"<<ID>>\",g" ${MANIFEST_PATH}
- >
sed -i "s,\"url\" : \"https://gitlab.gnome.org/GNOME/$PROJECT_NAME\",\"branch\" : \"<<current>>\"\,,g" ${MANIFEST_PATH}
- >
sed -i "s,\"url\" : \"https://gitlab.gnome.org/GNOME/\",\"path\" : \".\",g" ${MANIFEST_PATH}
# Adjust the manifest to HEAD
- sed -i "s,<<ID>>,$APPID,g" ${MANIFEST_PATH}
- sed -i "s,<<current>>,origin/$CI_COMMIT_REF_NAME,g" ${MANIFEST_PATH}
- flatpak-builder --bundle-sources --repo=devel build ${MANIFEST_PATH}
- flatpak build-bundle devel ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APPID}
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
when: manual
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment