RFC: snapcraft sources keyword for parts

Sergio Schvezov sergio.schvezov at canonical.com
Wed Nov 4 17:27:20 UTC 2015


Today, declaring a source for a part takes these options:

    - source:
      (string)
      A path to some source tree to build. It can be either remote or local,
      and either a directory tree or a tarball.
    - source-type:
      (string)
      In some cases the source is not enough to identify the version control
      system or compression algorithim. This hints the system into what to
      do, the valid values are:

                   - bzr
                   - mercurial
                   - hg
                   - git
                   - tar

    - source-branch:
      (string)
      A specific branch from the source tree. This will result in an error
      if used with a bazaar source type.
    - source-tag:
      (string)
      A specific tag from the source tree.


We would like to (appropriately deprecate this) and change that to a source
object, in that sense it would look like:

source:
(yaml object)

   - type
     (string)
     Determines a source implementation to use, similar to plugins.


So then, type: launchpad can have some launchpad specific keywords like

- project
  (string)
  launchpad project to use

- series
  (string)
  series to branch

and other relvant to bzr.


As a git type would have: repo, branch, tag etc..

The advantage of this is we don't contaminate the part with source-.*
keywords and each source type can have its specific keywords.

We also plan to support/autodetect plain source entries.

Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20151104/7da0dcf5/attachment.html>


More information about the snappy-app-devel mailing list