generate-sources:
    @python ./build-aux/flatpak-cargo-generator.py ./Cargo.lock -o generated-sources.json

update-potfiles:
    @git ls-files 'src/*.rs' 'data/resources/ui_templates/**/*.blp' 'data/*.desktop.in*' '*.gschema.xml' '*.metainfo.xml.in*' > po/POTFILES
    @git --no-pager diff po/POTFILES

update-pot: update-potfiles
    @xgettext -f po/POTFILES -o po/newsflash.pot --keyword=i18n --keyword=i18n_f --keyword=i18n_k --keyword=ni18n:1,2 --keyword=ni18n_f:1,2 --keyword=ni18n_k:1,2

build-flatpak:
    @rm -R -f flatpak-build
    @mkdir flatpak-build
    @flatpak-builder --repo=flatpak-build/repo --subject "Local Build" --body "No Body" --force-clean --disable-rofiles-fuse build build-aux/io.gitlab.news_flash.NewsFlash.Devel.json
    @flatpak build-bundle flatpak-build/repo flatpak-build/newsflash.flatpak io.gitlab.news_flash.NewsFlash.Devel
