Part source github release url - is it possible?


#1

Hi,
I would like to know if it is possible to source snap directly from Github releases?
This is what I came to but it is not working and I am out of ideas.

parts:
  render:
    plugin: dump
    source:
    - on amd64: https://github.com/VirtusLab/render/releases/download/$SNAPCRAFT_PROJECT_VERSION/render-linux-amd64
    - on i386: https://github.com/VirtusLab/render/releases/download/$SNAPCRAFT_PROJECT_VERSION/render-linux-386
    - on armhf: https://github.com/VirtusLab/render/releases/download/$SNAPCRAFT_PROJECT_VERSION/render-linux-arm
    - on arm64: https://github.com/VirtusLab/render/releases/download/$SNAPCRAFT_PROJECT_VERSION/render-linux-arm64
    stage:
      - render

Files are there for sure but that endups with error:

Failed to pull source: unable to determine source type of 'https://github.com/VirtusLab/render/releases/download/v0.1.6/render-linux-amd64'.
Check that the URL is correct or consider specifying `source-type` for this part. See `snapcraft help sources` for more information.

Any hints?


#2

there is sadly no source-type: binary or something similar and the files you try to download seem to be raw binary files …

source-type
Type: enum

Used when the type of source entry cannot be detected.

Can be one of the following: [bzr|deb|git|hg|local|mercurial|rpm|subversion|svn|tar|zip|7z]

(from https://snapcraft.io/docs/snapcraft-parts-metadata)

this is similar to: