Skip to content

How to vendor only parts of a project (in my case only the CLI part of gitbutler)? #138

@kastl-ars

Description

@kastl-ars

Hi all,

I found that gitbutler now has a CLI, which I wanted to package.
https://blog.gitbutler.com/but-cli

I prepared a package that pulls the gitbutler repository and vendors the dependencies.

<services>
  <service name="obs_scm" mode="manual">
    <param name="url">https://github.com/gitbutlerapp/gitbutler.git</param>
    <param name="scm">git</param>
    <param name="exclude">.git</param>
    <param name="revision">refs/tags/release/0.19.1</param>
    <param name="match-tag">release/*</param>
    <param name="versionformat">@PARENT_TAG@</param>
    <param name="versionrewrite-pattern">release/(.*)</param>
    <param name="changesgenerate">disable</param>
    <param name="filename">gitbutler-cli</param>
  </service>
  <service name="set_version" mode="manual">
  </service>
  <service name="cargo_vendor" mode="manual">
    <param name="update">false</param>
    <param name="respect-lockfile">true</param>
    <param name="srcdir">gitbutler</param>
  </service>
  <service name="tar" mode="buildtime"/>
  <service name="recompress" mode="buildtime">
    <param name="file">*.tar</param>
    <param name="compression">gz</param>
  </service>
</services>

Unfortunately it seems it is vendoring all dependencies, not just the ones needed for the CLI. And fails due to some duplicate things.

I tried to specify the correct Cargo.toml via the cargotoml parameter, but apparently this is to specify an additional file if it was not found automatically.

Can I tell the service to only vendor the files I explicitly tell it to vendor?

Kind Regards,
Johannes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions