Commit 5a79506b authored by Nikolaus Waxweiler's avatar Nikolaus Waxweiler

Build ninja dist with prebuilt binaries

parent 363db126
......@@ -4,11 +4,20 @@ build:
script:
- dnf install -y libappstream-glib-devel gettext
- pip3 install fontmake psautohint meson ninja
- meson build -Dfontsdir=/tmp/cantarell-fonts
- ninja -C build dist
- meson build
- ninja -C build install
# Make a dist package with prebuilt binaries.
- python3 scripts/flip-prebuilt-on.py meson_options.txt
- git add meson_options.txt
- cp /usr/local/share/fonts/cantarell/*.otf prebuilt
- git add prebuilt/*.otf
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
- git commit -m "Make package with prebuilt binaries, ninja will dist them."
- ninja -C build dist
artifacts:
paths:
- build/meson-dist
- /tmp/cantarell-fonts
- prebuilt/*.otf
expire_in: 7 days
\ No newline at end of file
"""Elaborate sed script to flip useprebuilt=True by default as I don't know
how to "" things in .gitlab-ci.yml."""
import argparse
import fileinput
parser = argparse.ArgumentParser()
parser.add_argument(
"meson_options_txt", type=str, help="The meson_options.txt file to change"
)
args = parser.parse_args()
text_to_search = "'useprebuilt', type : 'boolean', value : false"
replacement_text = "'useprebuilt', type : 'boolean', value : true"
with fileinput.FileInput(args.meson_options_txt, inplace=True, backup=".bak") as file:
for line in file:
print(line.replace(text_to_search, replacement_text), end="")
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