2018-03-27 11:45:20 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
appid=$1
|
|
|
|
|
2020-02-12 18:21:00 +00:00
|
|
|
builddir=flatpak_app
|
2018-03-27 11:45:20 +00:00
|
|
|
repodir=repo
|
|
|
|
|
|
|
|
flatpak-builder \
|
2020-02-19 15:04:58 +00:00
|
|
|
--user --disable-rofiles-fuse \
|
2018-03-27 11:45:20 +00:00
|
|
|
--stop-at=gtk \
|
|
|
|
${builddir} \
|
|
|
|
build-aux/flatpak/${appid}.json
|
|
|
|
|
2020-02-12 18:21:00 +00:00
|
|
|
flatpak build ${builddir} meson \
|
|
|
|
--prefix=/app \
|
|
|
|
--libdir=/app/lib \
|
2022-07-25 12:42:14 +00:00
|
|
|
--buildtype=debugoptimized \
|
2018-03-27 11:45:20 +00:00
|
|
|
-Dx11-backend=true \
|
|
|
|
-Dwayland-backend=true \
|
|
|
|
-Dbuild-tests=false \
|
2023-03-05 15:23:20 +00:00
|
|
|
-Dbuild-testsuite=false \
|
2018-03-27 11:45:20 +00:00
|
|
|
-Dbuild-examples=false \
|
2020-09-30 13:41:28 +00:00
|
|
|
-Dintrospection=disabled \
|
2018-03-27 11:45:20 +00:00
|
|
|
-Ddemos=true \
|
2021-05-18 11:37:09 +00:00
|
|
|
-Dprofile=devel \
|
2020-02-19 15:04:58 +00:00
|
|
|
_flatpak_build
|
2018-03-27 11:45:20 +00:00
|
|
|
|
2020-02-19 15:04:58 +00:00
|
|
|
flatpak build ${builddir} ninja -C _flatpak_build install
|
2018-03-27 11:45:20 +00:00
|
|
|
|
|
|
|
flatpak-builder \
|
2020-02-19 15:04:58 +00:00
|
|
|
--user --disable-rofiles-fuse \
|
2018-03-27 11:45:20 +00:00
|
|
|
--finish-only \
|
|
|
|
--repo=${repodir} \
|
|
|
|
${builddir} \
|
|
|
|
build-aux/flatpak/${appid}.json
|
|
|
|
|
|
|
|
flatpak build-bundle \
|
|
|
|
${repodir} \
|
|
|
|
${appid}-dev.flatpak \
|
2020-02-12 18:21:00 +00:00
|
|
|
--runtime-repo=https://nightly.gnome.org/gnome-nightly.flatpakrepo \
|
2018-03-27 11:45:20 +00:00
|
|
|
${appid}
|
2020-11-13 18:00:17 +00:00
|
|
|
|
|
|
|
# to be consumed by the nightly publish jobs
|
2021-11-29 22:37:49 +00:00
|
|
|
if [[ $CI_COMMIT_BRANCH == main ]]; then
|
2020-11-13 18:00:17 +00:00
|
|
|
tar cf repo.tar ${repodir}
|
|
|
|
fi
|