You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
1.3 KiB

# Utilities to include in other jobs.
# Remove the Flatpak modules that are only necessary when building the app with meson.
.remove_build_only_modules:
variables:
# JSON array of the names of the Flatpak modules to remove.
MODULES_TO_REMOVE: '["grass"]'
before_script:
# Create a temporary file.
- TMP_FILE=$(mktemp)
# Remove the modules in the manifest and write the output to the temporary file.
- jq --argjson modules_to_remove "${MODULES_TO_REMOVE}" 'del(.modules[] | select(IN(.name; $modules_to_remove | .[])))' ${MANIFEST_PATH} > $TMP_FILE
# Replace the manifest with the temporary file.
- mv $TMP_FILE ${MANIFEST_PATH}
# Use meson's build-env profile.
- sed -i "s|-Dprofile=development|-Dprofile=build-env|g" ${MANIFEST_PATH}
# Update the Flatpak manifest to use the latest stable GNOME runtime and use the corresponding
# container image.
#
# To get a list of available GNOME versions, see:
# https://gitlab.gnome.org/GNOME/gnome-runtime-images/-/blob/master/.gitlab-ci.yml
.stable_runtime:
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-${GNOME_STABLE_VERSION}'
variables:
GNOME_STABLE_VERSION: "49"
before_script:
# We want to use the latest stable GNOME runtime instead of the nightly runtime.
- sed -i "s|master|${GNOME_STABLE_VERSION}|g" ${MANIFEST_PATH}