Building an app in travis

Richard Hughes hughsient at gmail.com
Thu May 31 20:50:16 UTC 2018


Hi all,

We're building fwupd in travis for each commit and each branch we
push. As part of this build we build against Fedora, Debian and now we
also build a flatpak too. This travis build also creates the various
release-time deliverables, e.g. the .deb, the .rpm and the .flatpak
bundle.

What I need to do is build the current version of fwupd that is
checked out in the local directory. For instance, you can do this in
snap:

    source: .
    source-type: git

I've tried this in the flatpak manifest:

            "sources": [
                {
                    "type": "git",
                    "path": ".."
                }
            ]

...which works locally but not on travis:

Resolving deltas: 100% (587/587), done.
warning: reject refs/heads/wip/hughsie/flatpak because shallow roots
are not allowed to be updated
warning: reject refs/remotes/origin/wip/hughsie/flatpak because
shallow roots are not allowed to be updated
fatal: ambiguous argument 'master': unknown revision or path not in
the working tree.

The fallback plan is to use the $TRAVIS_BRANCH env var and re-write
the manifest as part of the build process but that's not awesome at
all. Ideas on how to do this properly most welcome, although I fear it
might be teaching flatpak-builder to just use the existing git
checkout without updating it (like snap can do).

Thanks for any ideas,

Richard


More information about the Flatpak mailing list